Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Isolating bin dependencies. #1716

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ phpcs.xml.dist export-ignore
psalm.xml.dist export-ignore
/Resources/doc export-ignore
/Tests export-ignore
/vendor-bin/**/composer.lock binary
3 changes: 3 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@ jobs:
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"

- name: "Install tools"
run: "composer bin all install"

- name: "Run a static analysis with vimeo/psalm"
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc) --find-unused-psalm-suppress"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ phpunit.xml
/.phpunit.result.cache
/phpcs.xml
/.phpcs-cache
/vendor-bin/**/vendor/
!/vendor-bin/**/composer.lock
17 changes: 12 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@
"symfony/service-contracts": "^1.1.1 || ^2.0 || ^3"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.5",
"doctrine/annotations": "^1 || ^2",
"doctrine/coding-standard": "^9.0",
"doctrine/deprecations": "^1.0",
"doctrine/orm": "^2.14 || ^3.0",
"friendsofphp/proxy-manager-lts": "^1.0",
"phpunit/phpunit": "^9.5.26 || ^10.0",
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-symfony": "^4",
"psr/log": "^1.1.4 || ^2.0 || ^3.0",
"symfony/phpunit-bridge": "^6.1",
"symfony/property-info": "^5.4 || ^6.0",
Expand All @@ -63,8 +62,7 @@
"symfony/var-exporter": "^5.4 || ^6.2 || ^7.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
"symfony/yaml": "^5.4 || ^6.0",
"twig/twig": "^1.34 || ^2.12 || ^3.0",
"vimeo/psalm": "^4.30"
"twig/twig": "^1.34 || ^2.12 || ^3.0"
},
"conflict": {
"doctrine/annotations": ">=3.0",
Expand All @@ -89,16 +87,25 @@
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true,
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"symfony/flex": true
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": true,
"target-directory": "vendor-bin"
}
},
"sort-packages": true
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
}
},
"bin": "echo 'bin not installed'"
}
}
8 changes: 5 additions & 3 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
autoloader="vendor-bin/psalm/autoload.php"
>
<plugins>
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>

<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/></plugins>
<projectFiles>
<ignoreFiles>
<directory name="vendor"/>
<directory name="vendor-bin/"/>
<!-- Deprecated classes, not worth fixing -->
<file name="Command/ImportMappingDoctrineCommand.php"/>
<file name="Command/Proxy/OrmProxyCommand.php"/>
Expand Down Expand Up @@ -58,7 +60,7 @@
<UndefinedDocblockClass>
<errorLevel type="suppress">
<!-- https://github.com/symfony/symfony/issues/45609 -->
<referencedClass name="UnitEnum" />
<referencedClass name="UnitEnum"/>
<directory name="DependencyInjection"/>
<directory name="Tests/DependencyInjection"/>
</errorLevel>
Expand Down
4 changes: 4 additions & 0 deletions vendor-bin/psalm/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/../../vendor/autoload.php';
7 changes: 7 additions & 0 deletions vendor-bin/psalm/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"require-dev": {
"vimeo/psalm": "^4.30",
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-symfony": "^4"
}
}
Loading
Loading