8000 [Cache] [5.0] Add type-hint to the Cache component. by Simperfit · Pull Request #32282 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Cache] [5.0] Add type-hint to the Cache component. #32282

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

Merged

Conversation

Simperfit
Copy link
Contributor
Q A
Branch? 5.0
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets Contribute to #32179
License MIT
Doc PR none

Add type-hint in the cache component whenever possible.

@nicolas-grekas
Copy link
Member

Thank you @Simperfit.

@nicolas-grekas nicolas-grekas merged commit 0a41f6c into symfony:master Jun 30, 2019
nicolas-grekas added a commit that referenced this pull request Jun 30, 2019
…perfit)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[Cache] [5.0] Add type-hint to the Cache component.

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | Contribute to #32179   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Add type-hint in the cache component whenever possible.

Commits
-------

0a41f6c [Cache] [5.0] add type hint to cache
@@ -107,7 +107,7 @@ function ($deferred, $namespace, &$expiredIds) use ($getId) {
*
* @return AdapterInterface
*/
public static function createSystemCache($namespace, $defaultLifetime, $version, $directory, LoggerInterface $logger = null)
public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null)
Copy link
Contributor

Choose a reason for hiding this comment

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

all the param phpdoc should be removed

Copy link
Contributor

Choose a reason for hiding this comment

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

btw, I also think the method should not be in AbstractAdapter. It get's inherited to all adapters. But it not meant to be overwritten or called with late static binding. It's a plain factory method, independent of all the adapters.

@Simperfit Simperfit deleted the feature/add-type-hint-to-cache branch July 1, 2019 07:53
Tobion added a commit that referenced this pull request Jul 2, 2019
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Cache] finish type-hints

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32179
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Finish leftovers from #32282

Commits
-------

1919c7d [Cache] finish type-hints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0