Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

phpstorm

/phpstorm

Wspiera pracę w PhpStorm: narzędzia języka PHP, integracje Laravel i Symfony, Xdebug, inspekcja zależności Composera, narzędzia bazodanowe oraz inspekcje PHPStan i Psalm.

Repozytorium
Agent-Skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Wspiera pracę w PhpStorm: narzędzia języka PHP, integracje Laravel i Symfony, Xdebug, inspekcja zależności Composera, narzędzia bazodanowe oraz inspekcje PHPStan i Psalm.

Oryginalny opis (EN)

Expert PhpStorm assistance covering PHP language tooling, Laravel/Symfony integrations, Xdebug setup, Composer dependency inspection, and database tooling. Use when configuring Xdebug remote debugging, setting up PHPStan/Psalm inspections, optimizing IDE performance, or debugging PHP applications.

Jak działa

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 164 linii, 613 słów
Podgląd SKILL.md
---
name: phpstorm
description: Expert PhpStorm assistance covering PHP language tooling, Laravel/Symfony integrations, Xdebug setup, Composer dependency inspection, and database tooling. Use when configuring Xdebug remote debugging, setting up PHPStan/Psalm inspections, optimizing IDE performance, or debugging PHP applications.
---

# PhpStorm

PhpStorm is essential for modern PHP. It understands **Laravel** Facades, **Symfony** Dependency Injection, and **Doctrine** queries.

## When to Use

- **Enterprise PHP & Laravel/Symfony Development**: Deep static analysis, auto-completion, and framework-aware refactoring.
- **Interactive Step Debugging with Xdebug**: Profiling execution paths, variable inspections, and setting conditional breakpoints.
- **PHPStan & Psalm Static Analysis Integration**: Real-time IDE diagnostics and automated type inference repairs.
- **Database Tooling & Remote Server Deployment**: Managing MariaDB/PostgreSQL instances and SFTP/SSH deployment pipelines.

## Quick Start

### 1. Docker Xdebug Configuration for PhpStorm

```ini
; php.ini / 99-xdebug.ini
[xdebug]
zend_extension=xdebug.so
xdebug.mode=debug,develop
xdebug.start_with_request=yes
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
xdebug.idekey=PHPSTORM
```

### 2. Configure PHP CLI Interpreter

- Go to **Settings/Preferences > PHP**.
- Set **PHP Executable** or configure **Docker / Docker Compose** remote interpreter.
- Click **Validate Debugger** to confirm port `9003` handshake.
- Turn on the telephone icon (**Start Listening for PHP Debug Connections**).

## Core Concepts

### Advanced Xdebug 3 Configuration

Setting up `php.ini` and configuring PhpStorm for zero-config Xdebug step debugging:

```ini
; php.ini (PHP 8.3 / 8.4)
[xdebug]
zend_extension = xdebug.so
xdebug.mode = debug,develop
xdebug.start_with_request = yes
xdebug.client_host = host.docker.internal
xdebug.client_port = 9003
xdebug.idekey = PHPSTORM
xdebug.log = /tmp/xdebug.log
```

Connecting PhpStorm to Docker Container mapping in `.idea/php.xml`:

```xml
<project version="4">
  <component name="PhpDebugGeneral" listening_started="true" />
  <component name="PhpServers">
    <servers>
      <server host="localhost" id="docker_server" name="docker_server" port="8080" use_path_mappings="true">
        <path_mappings>
          <mapping local-root="$PROJECT_DIR$" remote-root="/var/www/html" />
        </path_mappings>
      </server>
    </servers>
  </component>
</project>
```

### Framework Metadata Enhancement (`.phpstorm.meta.php`)

Providing PhpStorm with container return types and factory inference:

```php
<?php
// .phpstorm.meta.php
namespace PHPSTORM_META {
    override(\Illuminate\Contracts\Container\Container::make(0), map([
        '' => '@',
    ]));
    override(\app(0), map([
        '' => '@',
    ]));
}
```

### Static Analysis Automation (PHPStan & Pint)

Configuring Composer scripts and real-time inspections:

```json
{
  "scripts": {
    "lint": "pint --test",
    "lint:fix": "pint",
    "analyse": "phpstan analyse --level=9 --memory-limit=1G"
  }
}
```

## Common Patterns

### Path Mapping for Dockerized Projects

**Problem**: Breakpoints inside Docker containers are not hit because local and container filesystem paths differ.

**Solution**:

```ini
# .idea/php.xml (Docker Xdebug Path Mapping)
[Server]
Host=localhost
Port=8080
UsePathMappings=true
LocalPath=/Users/username/Code/my-project
RemotePath=/var/www/html
```

### Static Analysis (PHPStan / Psalm) Integration

**Problem**: Enforce strict type checks inside editor inspection gutters before code commit.  
**Solution**: Enable PHPStan in PhpStorm settings.

- Navigate to **PHP > Quality Tools > PHPStan**.
- Select Configuration file: `./phpstan.neon`.
- Set inspection level (e.g. Level 8). Highlighted errors appear live in the editor.

```neon
# phpstan.neon
parameters:
    level: 8
    paths:
        - app
        - tests
    checkMissingIterableValueType: false
```

## Best Practices

**Do**:

- Configure **PHPStan** or **Psalm** as a real-time inspection engine under **Settings -> Languages & Frameworks -> PHP -> Quality Tools**.
- Generate `.phpstorm.meta.php` and `_ide_helper.php` using Laravel IDE Helper for full autocompletion of magic facades.
- Use Docker Compose PHP Interpreters for consistent PHP runtime versions across engineering teams.
- Configure path mappings accurately when debugging code executing inside Docker or remote VMs.

**Don't**:

- Commit the user-specific workspace files inside `.idea/` (add `.idea/workspace.xml` and `.idea/shelf/` to `.gitignore`).
- Leave Xdebug enabled in production PHP environments; it carries significant performance overhead.
- Ignore PhpStorm inspections; utilize `Alt + Enter` for instant automated quick-fixes.

## Troubleshooting

| Error                                     | Cause                                                                   | Solution                                                                                                     |
| ----------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Xdebug breakpoint ignored / not triggered | `xdebug.client_host` wrong or firewall blocking port 9003               | Use `host.docker.internal` on Docker for Mac/Windows, verify IDE listener is enabled (green telephone icon). |
| High memory usage or slow indexing        | Indexing large directories like `storage/`, `var/`, or generated caches | Right-click directory > **Mark Directory as > Excluded**.                                                    |
| Laravel facade autocompletion broken      | PhpStorm does not know dynamic magic methods on facades                 | Install and run `barryvdh/laravel-ide-helper`: `php artisan ide-helper:generate`.                            |

## References

- [PhpStorm Documentation](https://www.jetbrains.com/phpstorm/documentation/)

Wersje

W bazie nie ma innych skilli o nazwie phpstorm.

Migawka bazy z 13.11.2026 · wersja paczki 865fc4d6d14e (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100performant-php
    Wspiera wydajny nowoczesny PHP 8.4 i 8.5: OPcache z JIT, workery FrankenPHP, Composer, Symfony i Laravel, PHPStan, Psalm i Pest.
  • 100php-code-review
    Przegląda kod PHP inspekcjami PhpStorm, wskazuje problemy jakości i pomaga je naprawić zgodnie z dobrymi praktykami.
  • 100php-tooling
    Konfiguruje narzędzia ekosystemu PHP, zarządzanie zależnościami i analizę statyczną: Composer, PHPStan i narzędzia budowania.
  • 100php-debugging
    Prowadzi debugowanie PHP z Xdebug: punkty przerwania, krokowe wykonanie, konfiguracja dwóch kontenerów, IDE i routing oparty na nagłówkach.
  • 100php-quality
    Prowadzi analizę statyczną, styl kodu i idiomy PHP 8.3-8.5: phpstan.neon i baseline, PHPStan lub Psalm, PHP-CS-Fixer lub PHP_CodeSniffer, PER-CS, PSR-12 i zestawy Rector.
  • 100php
    Wspiera pracę z nowoczesnym PHP 8.2/8.3+: typowanie ścisłe, atrybuty, fibers, Composer i OPcache, przy aplikacjach Laravel i Symfony, REST API oraz optymalizacji obciążeń.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.