10000 [Config] Delegate creation of ConfigCache instances to a factory. by mpdude · Pull Request #14178 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Config] Delegate creation of ConfigCache instances to a factory. #14178

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix wrong method name
  • Loading branch information
mpdude committed Apr 6, 2015
commit 98aa48b0dc1862c5a269039708838b40b19c8761
2 changes: 1 addition & 1 deletion src/Symfony/Component/Config/ConfigCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct($file, $debug)
* Gets the cache file path.
*
* @return string The cache file path
* @deprecated since 2.7, to be removed in 3.0. Use getFilePath() instead.
* @deprecated since 2.7, to be removed in 3.0. Use getPath() instead.
*/
public function __toString()
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add a deprecation notice (look for trigger_error() in Symfony 2.7 for some examples).

Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Config/ConfigCacheInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface ConfigCacheInterface
/**
* Gets the cache file path.
*
* @deprecated since version 2.7, to be removed in 3.0.
* @deprecated since 2.7, to be removed in 3.0. Use getPath() instead.
* @return string The cache file path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deprecated should be moved below this one and an empty line should be added between the two directives

*/
public function __toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be a better idea to either remove the __toString() from the interface or move it to a deprecated interface which can extend this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right! I'm going to remove it. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove it from the interface and update changelog & upgrade files to only mention the method in the ConfigCache class.

Expand All @@ -36,7 +36,7 @@ public function getPath();
/**
* Checks if the cache is still fresh.
*
* @return Boolean true if the cache is fresh, false otherwise
* @return bool true if the cache is fresh, false otherwise
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the extra spacing here

And I believe "whether the cache is fresh" is more consistent with other occurences in the Symfony code base

*/
public function isFresh();

Expand Down
0