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

Drop EOL PHP version (8.0) support and refactor #185

Merged
merged 24 commits into from
Jul 30, 2024

Conversation

koriym
Copy link
Member

@koriym koriym commented Jun 1, 2024

Closes #181

koriym added 16 commits June 2, 2024 00:04
The PHP requirement in our composer.json file has been updated to version 8.1 only. Additionally, the Rector dependency has been added to the developer requirements, which will aid in detecting and fixing code quality issues.
The commit includes changes to update the versions of several packages, as well as adjustments to some of their dependencies. It involves packages such as amphp/amp, amphp/byte-stream, composer/pcre, and several others. This update ensures that the application uses the latest, most secure, and most efficient versions of these packages.
Introduced a new rector.php configuration file to enforce strong typing across the codebase. Configured it to apply AddVoidReturnType
The code underwent a series of changes for better readability, encapsulation and performance. Use of null coalescing assignment operator, removal of unnecessary variable initializations and declarations, simplifying if-else conditions, and proper use of variable visibility in constructors are some of the major changes. This refactoring paves the way for easier maintenance and future improvements.
The TaggedProfile class and its related tests were removed from the codebase. This removal also impelled a few updates in the DrawDiagramTest class. The changes reflect a better understanding of the project requirements and a revised approach to achieving those requirements.
This commit refactors the AbstractDescriptor and derived classes (SemanticDescriptor, NullDescriptor, TransDescriptor) to remove unnecessary properties and clean up the type declarations. It standardizes the type hints across classes and updates properties with null and/or default values to be more concise and meaningful.
In the `AbstractProfile` and `Profile` classes, the variable type declarations have been updated for enhanced code readability and to reduce potential type-related runtime errors. The variables now are explicitly declared as either array or string types.
The ConfigFilter class and related functionality were removed from multiple files. This change simplified the codebase by getting rid of the now unnecessary checks and properties. This change also updated tests and HTML files to reflect the refactoring, ensuring the application remains fully functional.
The commit corrects the closing tag of the label HTML element linked to the radio button with id "asd-show-id" in the files 'tests/Fake/config/index.html', 'docs/blog/index.html', and 'src/IndexPage.php'. This fix ensures the label tag is properly closed enhancing the overall HTML code syntax correctness.
The application state diagram image on the Index page has been updated to have alt text. This change increases the accessibility of the website by providing a descriptive alternative to the image for visually impaired users who rely on screen readers.
The type of the first argument in the getNodeProps function of DrawDiagram.php has been updated from SemanticDescriptor to AbstractDescriptor. This change broadens the type of the descriptor that can be processed by this method, increasing its flexibility.
This commit refactors the GitHub workflows for static analysis, continuous integration, and coding standards to use external workflows from a shared repository (ray-di). This substantially reduces the complexity of our workflow files while maintaining the same operating logic.
Refactor DrawDiagram.php to omit unused variables

The code refactor within DrawDiagram.php resulted in getting rid of the unused variable $filterIds. The objective of the commit was to enhance code cleanliness and readability. Also, the removal of unused variables helps in reducing potential confusion in future development.
Remove unnecessary Immutable attributes in AppState and DrawDiagram

The unnecessary Immutable attributes from PhpStorm were removed in the AppState and DrawDiagram class files. These changes make the code cleaner and remove potential confusion about the mutability of these classes.
@koriym koriym marked this pull request as ready for review June 1, 2024 17:41
@koriym koriym requested a review from NaokiTsuchiya June 1, 2024 17:41
Several unused import statements have been removed from the asd binary file for better code cleanliness. The use of `color::` in options parsing has also been removed. This makes the code a bit more efficient and less prone to potential confusions due to unused imports and options.
The state diagram used in the blog has been updated with more accurate dimensions and tooltips. The img alt attribute for the diagram on the blog page has also been added for accessibility purposes.
The alt text for diagram images in multiple files has been updated. The text was previously capitalized as "Application State Diagram"; it has now been changed to a more standard format, "application state diagram".
@koriym
Copy link
Member Author

koriym commented Jun 1, 2024

@NaokiTsuchiya 担当してもらった大規模なPRでしたが... 👋

@koriym koriym mentioned this pull request Jun 9, 2024
A new file, box.json, has been added to define important paths and aliases for the project. Additionally, the method to determine the working directory within the script file 'asd' has been updated to adapt to the execution context, improving reliability in different scenarios.
Copy link

codecov bot commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.91%. Comparing base (54b3ce1) to head (0add547).

Current head 0add547 differs from pull request most recent head b8d761c

Please upload reports for the commit b8d761c to get more accurate results.

Files Patch % Lines
src/AppState.php 33.33% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##              master     #185      +/-   ##
=============================================
- Coverage     100.00%   98.91%   -1.09%     
+ Complexity       315      257      -58     
=============================================
  Files             32       30       -2     
  Lines            862      735     -127     
=============================================
- Hits             862      727     -135     
- Misses             0        8       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Adds a new GitHub workflow to automate the process of PHAR package release. The workflow includes steps such as compile, upload, download, and attach the PHAR artifact to the release. It is triggered on release publish and can also be manually dispatched.
This update moves the "bamarni/composer-bin-plugin" from "require-dev" to "require" in the composer.json file. Additionally, a new script command "compile" has been introduced and included in the "build" command. This helps streamline the build process and makes certain that the plugin is available in production environments too.
@koriym
Copy link
Member Author

koriym commented Jul 5, 2024

@coderabbitai review

@koriym koriym merged commit ce83c67 into alps-asd:master Jul 30, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants