You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(feed): remove deprecated feed types and make unknown-type handling consistent
Remove the feed types deprecated in 2.x — SparkleIOFeedType,
EventDatabaseApiFeedType and KobaFeedType — for the 3.0.0 release.
feed_source.feed_type stores the FQCN as a plain string (not an FK), so
removing a class leaves orphaned rows that FeedService::getFeedType() can no
longer resolve. Make that handling consistent across the API:
- Reads degrade, never 500: FeedSourceProvider::toOutput() catches
UnknownFeedTypeException and exposes no secrets, so feed sources (and feeds
embedding them, item and collection) stay listable and removable. The feed
data endpoint already returns an empty result.
- Writes reject: creating/updating a feed source with an unknown feed type maps
UnknownFeedTypeException to HTTP 422 (was an opaque 500) via exception_to_status.
Tooling for cleaning up referencing rows:
- DeprecatedFeedSourceFinder + app:feed:remove-deprecated-feed-sources (dry-run
report; --force removes the feed sources, their feeds and the bound slides,
cascading to PlaylistSlide), covering all tenants.
- app:update prints a notice when deprecated feed sources remain.
Also remove the backend/frontend references (admin feed-type selector, the v1
event-database config component and its translation), switch test fixtures to
EventDatabaseApiV2FeedType, regenerate the PHPStan baseline, and document the
upgrade step in UPGRADE.md / CHANGELOG.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`name` becomes the key under `Feed.configuration`. The second arg to `getFeedSourceConfigUrl()` is the `$name` your `getConfigOptions()` dispatches on.
Called by `FeedSourceConfigGetController` for dynamic dropdowns. Return `[{id, title, value}, …]` or `null` for unknown `$name`.
145
152
146
153
**Swallow exceptions here** — the admin form should degrade gracefully while an editor is still typing credentials. Log + return `null`/`[]`.
@@ -168,6 +175,7 @@ Rules (these are the most common bugs):
168
175
1.**Validate required secrets/config first** — throw `\RuntimeException` with class-prefixed message if missing.
169
176
2.**Let exceptions bubble.**`FeedService::getData()` wraps the call and caches an empty result for **30 s** on failure (`ERROR_CACHE_TTL_SECONDS`). Catching-and-returning-`[]` yourself caches empty with the **full feed TTL** (often hours) — silent breakage.
170
177
3.**Log at the catch site, then rethrow:**
178
+
171
179
```php
172
180
try { /* … */ }
173
181
catch (\Throwable $t) {
@@ -179,6 +187,7 @@ Rules (these are the most common bugs):
179
187
throw $t;
180
188
}
181
189
```
190
+
182
191
4.**Don't add per-call caching around the whole `getData()`** — `FeedService` already caches per-feed and honours `configuration['cache_expire']` as a per-feed TTL override. Cache lower-level shared lookups separately if needed.
183
192
184
193
## 4. Output data contract
@@ -226,7 +235,8 @@ Declare in `config/packages/cache.yaml` and inject by name. **Don't** reuse `$fe
226
235
| External system with its own SDK/client | `src/Feed/BrndFeedType.php` + `src/Feed/SourceType/Brnd/` |
Copy file name to clipboardExpand all lines: phpstan-baseline.neon
-114Lines changed: 0 additions & 114 deletions
Original file line number
Diff line number
Diff line change
@@ -1608,42 +1608,6 @@ parameters:
1608
1608
count:1
1609
1609
path:src/Feed/ColiboFeedType.php
1610
1610
1611
-
-
1612
-
message:'#^Method App\\Feed\\EventDatabaseApiFeedType\:\:getAdminFormOptions\(\) return type has no value type specified in iterable type array\.$#'
1613
-
identifier:missingType.iterableValue
1614
-
count:1
1615
-
path:src/Feed/EventDatabaseApiFeedType.php
1616
-
1617
-
-
1618
-
message:'#^Method App\\Feed\\EventDatabaseApiFeedType\:\:getConfigOptions\(\) return type has no value type specified in iterable type array\.$#'
1619
-
identifier:missingType.iterableValue
1620
-
count:1
1621
-
path:src/Feed/EventDatabaseApiFeedType.php
1622
-
1623
-
-
1624
-
message:'#^Method App\\Feed\\EventDatabaseApiFeedType\:\:getData\(\) return type has no value type specified in iterable type array\.$#'
1625
-
identifier:missingType.iterableValue
1626
-
count:1
1627
-
path:src/Feed/EventDatabaseApiFeedType.php
1628
-
1629
-
-
1630
-
message:'#^Method App\\Feed\\EventDatabaseApiFeedType\:\:getRequiredConfiguration\(\) return type has no value type specified in iterable type array\.$#'
1631
-
identifier:missingType.iterableValue
1632
-
count:1
1633
-
path:src/Feed/EventDatabaseApiFeedType.php
1634
-
1635
-
-
1636
-
message:'#^Method App\\Feed\\EventDatabaseApiFeedType\:\:getRequiredSecrets\(\) return type has no value type specified in iterable type array\.$#'
1637
-
identifier:missingType.iterableValue
1638
-
count:1
1639
-
path:src/Feed/EventDatabaseApiFeedType.php
1640
-
1641
-
-
1642
-
message:'#^Method App\\Feed\\EventDatabaseApiFeedType\:\:getSchema\(\) return type has no value type specified in iterable type array\.$#'
1643
-
identifier:missingType.iterableValue
1644
-
count:1
1645
-
path:src/Feed/EventDatabaseApiFeedType.php
1646
-
1647
1611
-
1648
1612
message:'#^Method App\\Feed\\EventDatabaseApiV2FeedType\:\:getAdminFormOptions\(\) return type has no value type specified in iterable type array\.$#'
1649
1613
identifier:missingType.iterableValue
@@ -1764,48 +1728,6 @@ parameters:
1764
1728
count:1
1765
1729
path:src/Feed/FeedTypeInterface.php
1766
1730
1767
-
-
1768
-
message:'#^Method App\\Feed\\KobaFeedType\:\:getAdminFormOptions\(\) return type has no value type specified in iterable type array\.$#'
1769
-
identifier:missingType.iterableValue
1770
-
count:1
1771
-
path:src/Feed/KobaFeedType.php
1772
-
1773
-
-
1774
-
message:'#^Method App\\Feed\\KobaFeedType\:\:getBookingsFromResource\(\) return type has no value type specified in iterable type array\.$#'
1775
-
identifier:missingType.iterableValue
1776
-
count:1
1777
-
path:src/Feed/KobaFeedType.php
1778
-
1779
-
-
1780
-
message:'#^Method App\\Feed\\KobaFeedType\:\:getConfigOptions\(\) return type has no value type specified in iterable type array\.$#'
1781
-
identifier:missingType.iterableValue
1782
-
count:1
1783
-
path:src/Feed/KobaFeedType.php
1784
-
1785
-
-
1786
-
message:'#^Method App\\Feed\\KobaFeedType\:\:getData\(\) return type has no value type specified in iterable type array\.$#'
1787
-
identifier:missingType.iterableValue
1788
-
count:1
1789
-
path:src/Feed/KobaFeedType.php
1790
-
1791
-
-
1792
-
message:'#^Method App\\Feed\\KobaFeedType\:\:getRequiredConfiguration\(\) return type has no value type specified in iterable type array\.$#'
1793
-
identifier:missingType.iterableValue
1794
-
count:1
1795
-
path:src/Feed/KobaFeedType.php
1796
-
1797
-
-
1798
-
message:'#^Method App\\Feed\\KobaFeedType\:\:getRequiredSecrets\(\) return type has no value type specified in iterable type array\.$#'
1799
-
identifier:missingType.iterableValue
1800
-
count:1
1801
-
path:src/Feed/KobaFeedType.php
1802
-
1803
-
-
1804
-
message:'#^Method App\\Feed\\KobaFeedType\:\:getSchema\(\) return type has no value type specified in iterable type array\.$#'
1805
-
identifier:missingType.iterableValue
1806
-
count:1
1807
-
path:src/Feed/KobaFeedType.php
1808
-
1809
1731
-
1810
1732
message:'#^Method App\\Feed\\NotifiedFeedType\:\:getAdminFormOptions\(\) return type has no value type specified in iterable type array\.$#'
1811
1733
identifier:missingType.iterableValue
@@ -1932,42 +1854,6 @@ parameters:
1932
1854
count:1
1933
1855
path:src/Feed/SourceType/Colibo/ApiClient.php
1934
1856
1935
-
-
1936
-
message:'#^Method App\\Feed\\SparkleIOFeedType\:\:getAdminFormOptions\(\) return type has no value type specified in iterable type array\.$#'
1937
-
identifier:missingType.iterableValue
1938
-
count:1
1939
-
path:src/Feed/SparkleIOFeedType.php
1940
-
1941
-
-
1942
-
message:'#^Method App\\Feed\\SparkleIOFeedType\:\:getConfigOptions\(\) return type has no value type specified in iterable type array\.$#'
1943
-
identifier:missingType.iterableValue
1944
-
count:1
1945
-
path:src/Feed/SparkleIOFeedType.php
1946
-
1947
-
-
1948
-
message:'#^Method App\\Feed\\SparkleIOFeedType\:\:getData\(\) return type has no value type specified in iterable type array\.$#'
1949
-
identifier:missingType.iterableValue
1950
-
count:1
1951
-
path:src/Feed/SparkleIOFeedType.php
1952
-
1953
-
-
1954
-
message:'#^Method App\\Feed\\SparkleIOFeedType\:\:getRequiredConfiguration\(\) return type has no value type specified in iterable type array\.$#'
1955
-
identifier:missingType.iterableValue
1956
-
count:1
1957
-
path:src/Feed/SparkleIOFeedType.php
1958
-
1959
-
-
1960
-
message:'#^Method App\\Feed\\SparkleIOFeedType\:\:getRequiredSecrets\(\) return type has no value type specified in iterable type array\.$#'
1961
-
identifier:missingType.iterableValue
1962
-
count:1
1963
-
path:src/Feed/SparkleIOFeedType.php
1964
-
1965
-
-
1966
-
message:'#^Method App\\Feed\\SparkleIOFeedType\:\:getSchema\(\) return type has no value type specified in iterable type array\.$#'
1967
-
identifier:missingType.iterableValue
1968
-
count:1
1969
-
path:src/Feed/SparkleIOFeedType.php
1970
-
1971
1857
-
1972
1858
message:'#^Method App\\Filter\\CampaignFilter\:\:filterProperty\(\) has parameter \$value with no type specified\.$#'
0 commit comments