-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Defining PHP 8.1 as base version #79
Conversation
Worked fine to me. |
composer.json
Outdated
"byjg/webrequest": "4.9.*", | ||
"php": ">=7.4", | ||
"ext-json": "*" | ||
"php": ">=8.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constraint also allows version 8.4, but this version of PHP is not covered by the GitHub workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to upgrade the project https://github.com/byjg/docker-php to support PHP 8.4 since alpine:edge
has the 8.4 beta already :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is different: this packages can be installed with version 8.4 of PHP but it is not tested with that version. This can therefore lead to problems on the user side, as PHP does not follow semantic versioning.
This would help:
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. I'll add this.
PHP 8.4 still on beta. As soon I upgrade all projects to PHP 8.x adding
types for all classes and implementing the fix suggested by `psalm` I will
add the PHP 8.4 in the tests.
Just FYI, these are the projects I am working on:
- All components: https://opensource.byjg.com/docs/php/ (all of them in the
version 5.0.x-dev, with Psalm and strong types, however, plenty of breaking
changes, be advised)
- The PHP docker, for production and CI/CD:
https://github.com/byjg/docker-php. I am using alpine, and I noticed that
`ALPINE:edge` already has the 8.4 beta :)
…On Mon, Sep 16, 2024 at 10:33 AM Frank Brückner ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In composer.json
<#79 (comment)>:
> @@ -5,13 +5,14 @@
"prefer-stable": true,
"license": "MIT",
"require": {
- "byjg/webrequest": "4.9.*",
- "php": ">=7.4",
- "ext-json": "*"
+ "php": ">=8.1",
This constraint also allows version 8.4, but this version of PHP is not
covered by the GitHub workflow.
—
Reply to this email directly, view it on GitHub
<#79 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHPXJDRQRJFBZABALZETX3ZW326LAVCNFSM6AAAAABBQR2APSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMBXGAZDCMBUHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I decided to limit the PHP Version explicitly to 8.3. I am creating a new official tag now. |
This pull request includes several updates to modernize the codebase, improve type safety, and enhance testing. Key changes involve updating PHP versions, adding Psalm for static analysis, renaming and adding new run configurations, and refactoring code to use stricter type declarations.
Updates to Testing and CI:
.github/workflows/phpunit.yml
: Added PHP 8.3 to the test matrix and removed older versions (7.4, 8.0). Also added Psalm static analysis to the CI pipeline. [1] [2].travis.yml
: Removed the Travis CI configuration in favor of GitHub Actions.Configuration and Dependency Updates:
composer.json
: Updated PHP requirement to>=8.1
, updated dependencies to their latest versions, and addedvimeo/psalm
for static analysis. [1] [2]psalm.xml
: Added a new configuration file for Psalm static analysis.Code Refactoring for Type Safety:
src/AbstractRequester.php
: Refactored methods to use stricter type declarations and updated exception handling. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]src/ApiRequester.php
: Updated to use stricter type declarations and improved exception handling. [1] [2] [3]Documentation and Configuration:
.idea/runConfigurations/Main.xml
: Renamed fromTest_Project.xml
and updated configuration..idea/runConfigurations/Psalm.xml
: Added a new run configuration for Psalm.These changes collectively enhance the project's compatibility with modern PHP versions, improve code quality through static analysis, and ensure better type safety across the codebase.