Feature/updates (mainly support for psr/container ^2.0) #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
I'm offering this pull request, because I tried to install the slack-php-app-framework package to a recent Symfony project, and it failed because of the psr/container requirement that was pinned to ^1.0. Modern Symfony versions only support ^2.0, which makes it impossible to install. As the 2.0 version of psr/container still has the same implementation of the PSR-11 standard, there is no reason to add it to the requirements in this project's composer.json.
While adding ^2.0 to the composer.json, I noticed that the installed version in the vendor directory was not bumped and remained on the ^1.0 version. This was due to the
friendsofphp/php-cs-fixer
dev-requirement, which depends on an older version of symfony/contracts, which in turn requires psr/container ^1.0. By moving this dev-dependency to a separate composer.json (as recommended in the README of php-cs-fixer). I also moved the phpstan and phpunit packages to this separate composer.json, for consistency. I updated thescripts
section of the root composer.json and the GitHub actions definition accordingly. The only thing that is different for running tests locally, is that you'll need to runcomposer install --working=dir=tools
first, in order to install php-cs-fixer, phpunit and phpstan.I also removed the root composer.lock, as this has no purpose for package projects. It will only fix package versions used when testing your code, which is not desirable.
FInally, I updated the GitHub actions configuration to run the tests on any branch, as I wanted to see the test results of my changes in my feature branch as well :-)
So, effectively this PR: