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

cXML Version 2.0.0 (PHP 8.2+) #30

Merged
merged 36 commits into from
Sep 11, 2024
Merged

cXML Version 2.0.0 (PHP 8.2+) #30

merged 36 commits into from
Sep 11, 2024

Conversation

ynnoig
Copy link
Member

@ynnoig ynnoig commented May 31, 2024

Upgrade and Refactor Library

This pull request includes a comprehensive upgrade and refactor of the library. The key changes are as follows:

  • Breaking Change: The library now requires PHP 8.2+.
  • Migration: Refactored from PHP annotations to PHP attributes.
  • Refactor:
    • Applied Rector and PHPStan for improved code quality and stricter type declarations.
    • Promoted class properties and applied the readonly modifier where applicable.
    • Removed unused doctrine/annotations and applied strict rules in php-cs.
    • Upgraded to jms/serializer 3.30.
  • CI Updates: Removed support for old PHP versions in CI configurations.
  • Style and Code Quality: Applied various code style fixes and quality improvements using Rector and php-cs-fixer.

Changelog for possible v2.0.0

Breaking Changes

  • Dropped support for PHP versions below 8.2.
  • Migrated from PHP annotations to PHP attributes.

Features

  • Upgraded jms/serializer to version 3.30.

Refactoring and Improvements

  • Applied Rector for code quality improvements:
    • InstanceOf optimization.
    • Privatization and early return.
    • Dead code elimination.
    • Type declarations.
    • Boolean strictness.
  • Promoted class properties and applied readonly modifier for classes, properties, and constants.
  • Removed unnecessary doctrine/annotations.
  • Applied PHPStan strict rules and various strict rules in php-cs.
  • Renamed Ser to Serializer.

CI Updates

  • Removed old PHP versions from CI configurations.

Style and Code Quality

  • Ran php-cs-fixer for consistent code style.
  • Various code style fixes and improvements.

Additional Note for Users of Older PHP Versions

If you are using a PHP version older than 8.2, please use the 1.x version of this library. The 2.x version introduces changes that require PHP 8.2 or newer.

To continue using the library with older PHP versions, you can specify the 1.x version in your composer.json:

{
    "require": {
        "friendsofcxml/cxml-php": "^1.0"
    }
}

@ynnoig ynnoig self-assigned this May 31, 2024
@ynnoig ynnoig requested a review from mathielen May 31, 2024 17:14
+simple endpoint test
removed StatusResponse (not used)
@ynnoig
Copy link
Member Author

ynnoig commented Jun 10, 2024

@mathielen did u had some time to review this PR?

@mathielen
Copy link
Collaborator

Not really :( But if you guys had I'm happy to just release it. I will upgrade my projects successively after that.

@mathielen mathielen merged commit 8a14ffd into main Sep 11, 2024
2 checks passed
@mathielen mathielen deleted the feat/version-2 branch September 11, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants