Closed marianodonal closed 2 years ago
What is exact CakePHP version you are using? Also, the package version.
CakePHP 4.3.0
I've fixed it by updating routes.php file in plugin config folder.
use Cake\Routing\RouteBuilder;
use Cake\Routing\Route\DashedRoute;
return static function (RouteBuilder $routes) {
$routes->plugin('AssetMix', ['path' => '/asset-mix'], function (RouteBuilder $routes) {
$routes->fallbacks(DashedRoute::class);
});
};
I don't know how to perform a pull request, maybe I can collaborate. Thanks
I'm on CakePHP 4.3 with the latest version of this package and I've also changed the routes.php
file because of the deprecation warnings I get when I start the CakePHP server:
<?php
use Cake\Routing\Route\DashedRoute;
use Cake\Routing\RouteBuilder;
/** @var RouteBuilder $routes */
$routes->plugin(
'AssetMix',
['path' => '/asset-mix'],
function (RouteBuilder $routes) {
$routes->fallbacks(DashedRoute::class);
});
@ishanvyas22 let me know which version seems more appropriate to you so that I can create a PR.
PS: I will be opening the same PR on cakephp-inertiajs too
@Andream98 v4.3.0 seems good as it is deprecated in that version only.
You can create a PR with the change and updating CakePHP version to 4.3 in composer.json
file.
Released in 1.4.0
Describe the bug Hi, i'm new with react and laravel mix. I'm trying to create an app when I get two deprecation warnings:
Router::plugin()
is deprecated, use the non-static methodRouterBuilder::plugin()
instead. - /Applications/MAMP/htdocs/cakereact/vendor/ishanvyas22/asset-mix/config/routes.php, line: 11 You can disable all deprecation warnings by settingError.errorLevel
toE_ALL & ~E_USER_DEPRECATED
, or addvendor/ishanvyas22/asset-mix/config/routes.php
toError.ignoredDeprecationPaths
in yourconfig/app.php
to mute deprecations from only this file. [CORE/src/Core/functions.php, line 322]Router::scope()
is deprecated, use the non-static methodRouterBuilder::scope()
instead. - /Applications/MAMP/htdocs/cakereact/vendor/cakephp/cakephp/src/Routing/Router.php, line: 912 You can disable all deprecation warnings by settingError.errorLevel
toE_ALL & ~E_USER_DEPRECATED
, or addvendor/cakephp/cakephp/src/Routing/Router.php
toError.ignoredDeprecationPaths
in yourconfig/app.php
to mute deprecations from only this file. [CORE/src/Core/functions.php, line 322]