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
Deprecator::log('ElementQuery-clearCachedResult', 'Calling ->clearCachedResult on an ElementQuery is deprecated. Use ->clearResultOverride() instead.');
229
+
230
+
/** @var ElementQuery $this */
231
+
$this->clearResultOverride();
232
+
});
233
+
234
+
ElementQuery::macro('collect', function() {
235
+
Deprecator::log('ElementQuery-collect', 'Calling ->collect on an ElementQuery is deprecated. ElementQuery now returns a collection by default.');
236
+
237
+
return$this->get();
238
+
});
210
239
}
211
240
212
241
protectedfunctionregisterLegacyApp(): void
@@ -246,7 +275,7 @@ protected function registerLegacyApp(): void
246
275
$app->setTimeZone(app()->getTimezone());
247
276
$app->language = app()->getLocale();
248
277
249
-
\Craft::$app = $app;
278
+
Craft::$app = $app;
250
279
251
280
$this->bootEvents();
252
281
self::bootYiiEvents();
@@ -468,11 +497,11 @@ private function bootEvents(): void
468
497
$craft = app('Craft');
469
498
470
499
// Fire an 'afterEditionChange' event
471
-
if (!$craft->hasEventHandlers(\craft\web\Application::EVENT_AFTER_EDITION_CHANGE)) {
500
+
if (!$craft->hasEventHandlers(Application::EVENT_AFTER_EDITION_CHANGE)) {
0 commit comments