Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commit8c43fac
committed
bug#40780 [Cache] Apply NullAdapter as Null Object (roukmoute)
This PR was squashed before being merged into the 4.4 branch.Discussion----------[Cache] Apply NullAdapter as Null Object| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets |Fix#40753| License | MIT<!--| Doc PR | symfony/symfony-docs#... <!-- required for new features -->There is a problem with the NullAdapter if I have to add an expression to work:```php$adapter = new NullAdapter();$item = new CacheItem();$item->set('FooBar');if (!$adapter->save($item) && !($adapter instanceof NullAdapter)) { throw new Exception('Uoh oh');}```So the goal here is to modify the methods that are causing a problem to behave as a Null Object.Commits-------f6818eb [Cache] Apply NullAdapter as Null ObjectFile tree
2 files changed
+7
-7
lines changed- src/Symfony/Component/Cache
- Adapter
- Tests/Adapter
2 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
| 138 | + | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
0 commit comments
Comments
(0)