8000 [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
CS fixes
  • Loading branch information
mpdude committed Apr 6, 2015
commit ae29b82502d15e9b58983278a04d674f19a2a3fc
4 changes: 2 additions & 2 deletions src/Symfony/Component/Config/ConfigCacheFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ interface ConfigCacheFactoryInterface
* Creates a cache instance and (re-)initializes it if necessary.
*
* @param string $file The absolute cache file path
* @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback.
* @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback
*
* @return ConfigCacheInterface $configCache The cache instance.
* @return ConfigCacheInterface $configCache The cache instance
*/
public function cache($file, $callable);
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to change file argument name here and to make it more generic.

Copy link
Member

Choose a reason for hiding this comment

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

what about $resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know... I did not intend to change the way ConfigCache works with this PR, so...?

}
2 changes: 1 addition & 1 deletion src/Symfony/Component/Config/DefaultConfigCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DefaultConfigCacheFactory implements ConfigCacheFactoryInterface
/**
* Constructor.
Copy link
Contributor

Choose a reason for hiding this comment

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

not necessary :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

... but seen in many other places :)

Copy link
Member

Choose a reason for hiding this comment

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

... but we are not doing it anymore :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aye sir :)

*
* @param bool $debug The debug flag to pass to ConfigCache.
* @param bool $debug The debug flag to pass to ConfigCache
*/
public function __construct($debug)
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to use false as default value for $debug

{
Expand Down
0