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

[3.7] Simplify instantiation of Registry #12395

Merged
merged 2 commits into from
Oct 12, 2016
Merged

[3.7] Simplify instantiation of Registry #12395

merged 2 commits into from
Oct 12, 2016

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Oct 12, 2016

Summary of Changes

Following #12270 this simplifies the instantiation of Registry objects across the rest of the application. This also replaces a couple lingering uses of JRegistry.

Testing Instructions

Functions using the Registry object continue working as expected.

Documentation Changes Required

N/A

@sovainfo
Copy link
Contributor

What about removing the usage of $registry when not needed?

@wilsonge wilsonge added this to the Joomla 3.7.0 milestone Oct 12, 2016
@wilsonge wilsonge merged commit d13d0de into joomla:3.7.x Oct 12, 2016
@mbabker mbabker deleted the registry-instantiation branch October 12, 2016 12:29
@mbabker
Copy link
Contributor Author

mbabker commented Oct 12, 2016

What about removing the usage of $registry when not needed?

Working through that as able, some things are easier than others.

@sovainfo
Copy link
Contributor

Thanks for not ignoring.
Too late for this PR, but thought about replacing
$data->params->merge($registry);
with
$data->params->merge(new Registry($data->params));
making $registry obsolete.

@mbabker
Copy link
Contributor Author

mbabker commented Oct 12, 2016

I was thinking about that last night but honestly couldn't remember if PHP 5.3 supported that syntax (this is the only place I write code anymore that has to retain 5.3 compatibility). All in all I'm trying to clean things up bit by bit which also makes cleaning stuff up in the 4.0 branch easier (like the places that are casting the Registry to a string could be replaced with (new Registry($data))->toString(); with 5.4+ syntax to avoid the needless variable AND keeping that stuff in memory).

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.

4 participants