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

Remove aliases #248

Merged
merged 4 commits into from
Dec 21, 2023
Merged

Remove aliases #248

merged 4 commits into from
Dec 21, 2023

Conversation

vjik
Copy link
Member

@vjik vjik commented Dec 21, 2023

Q A
Is bugfix?
New feature?
Breaks BC? ✔️

Fix #244

Copy link

what-the-diff bot commented Dec 21, 2023

PR Summary

  • Removal of dependency and related statements from various files
    The dependency, "yiisoft/aliases", has been removed from the composer.json and corresponding use Yiisoft\Aliases\Aliases statements have been removed from a number of files. The $aliases variable, which used this dependency, has also been removed in all occurrences.

  • Direct referencing of template files and paths
    Previously, there were calls to the get method on $aliases object to fetch the location of certain files. These calls have been replaced with direct referencing of the required files and paths.

  • Methods modification and addition in 'src/Service/MigrationService.php'
    In the MigrationService, multiple code tweaks were made to eliminate the use of the Aliases dependency. The getMigrationPaths() method and two other methods were simplified to facilitate direct referencing for migration paths. Migration file paths and source paths have also been directly referenced now, instead of using the Aliases 'get' method.

  • Tests updated to use MigrationHelper instead of Aliases
    Test files have been updated so that instead of calling the get method on the Aliases object, they now utilize the MigrationHelper's getRuntimePath() method. Tests that used Aliases objects in the createContainer() method no longer do so, making the code leaner.

  • Modification in 'MigrationHelper.php'
    Changes in the tests/Support/Helper/MigrationHelper.php include the removal of self::PATH_ALIAS constant and an addition of the getRuntimePath() method. Furthermore, the useMigrationsPath() and createMigration() methods were updated to use this new method or other direct referencing, instead of relying on the get method from the Aliases object.

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f99d3b3) 97.34% compared to head (01e7b69) 100.00%.

Additional details and impacted files
@@              Coverage Diff              @@
##             master      #248      +/-   ##
=============================================
+ Coverage     97.34%   100.00%   +2.65%     
+ Complexity      313       312       -1     
=============================================
  Files            21        21              
  Lines          1055      1050       -5     
=============================================
+ Hits           1027      1050      +23     
+ Misses           28         0      -28     

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

@vjik vjik requested a review from a team December 21, 2023 14:46
@vjik vjik added the status:code review The pull request needs review. label Dec 21, 2023
@samdark samdark merged commit 7e5de49 into master Dec 21, 2023
103 checks passed
@samdark samdark deleted the remove-aliases branch December 21, 2023 15:25
@samdark
Copy link
Member

samdark commented Dec 21, 2023

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase code coverage to 100%
2 participants