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

Breaking: Rename global properties #1243

Merged
merged 30 commits into from
Mar 10, 2023
Merged

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Mar 10, 2023

This will hopefully be the last breaking change. The old accessors are present but deprecated and will be removed before v1.0-proper. I think the RC break is justified here as since the properties are not documented I don't think many people use it so the impact is low, and the naming issue is quite severe. These are legacy properties introduced before route keys were a thing.

  • The global $currentRoute variable will be renamed to $route as "current" is implied
  • The global $currentRoute variable will be renamed to $routeKey as "current" is implied, and it's not a page.

For this, the location of the actual shared variables (in the ViewData) class are also deprecated, and updated for the renames. Most of these changes should be easy to upgrade with search+replace in project files.

Pending rename to `$route` as "current" is implied
Pending rename to `$routeKey` as "current" is implied, and it's not a page
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #1243 (e22e147) into master (641df36) will not change coverage.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##              master     #1243     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
- Complexity      1317      2636   +1319     
=============================================
  Files            152       304    +152     
  Lines           3459      6922   +3463     
=============================================
+ Hits            3459      6922   +3463     
Impacted Files Coverage Δ
packages/framework/src/Support/Facades/Render.php 100.00% <ø> (ø)
...mework/src/Foundation/Concerns/ManagesViewData.php 100.00% <100.00%> (ø)
...ges/framework/src/Foundation/Kernel/Hyperlinks.php 100.00% <100.00%> (ø)
...ckages/framework/src/Support/Models/RenderData.php 100.00% <100.00%> (ø)

... and 152 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@caendesilva caendesilva force-pushed the rename-global-properties branch from 0ecf127 to dd9106c Compare March 10, 2023 12:37
@caendesilva caendesilva force-pushed the rename-global-properties branch from aef54de to 15f6a9b Compare March 10, 2023 13:36
@caendesilva caendesilva force-pushed the rename-global-properties branch from 4a7f311 to 2649ce8 Compare March 10, 2023 13:43
@caendesilva caendesilva marked this pull request as ready for review March 10, 2023 13:53
@caendesilva caendesilva merged commit c95e72c into master Mar 10, 2023
@caendesilva caendesilva deleted the rename-global-properties branch March 10, 2023 13:58
caendesilva added a commit that referenced this pull request Mar 10, 2023
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.

1 participant