File tree 4 files changed +17
-4
lines changed
4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 23
23
* @copyright Since 2007 PrestaShop SA and Contributors
24
24
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25
25
*/
26
+
27
+ use PrestaShop \PrestaShop \Core \Util \CacheClearLocker ;
26
28
use Symfony \Component \Dotenv \Dotenv ;
27
29
use Symfony \Component \ErrorHandler \Debug ;
28
30
use Symfony \Component \HttpFoundation \Request ;
60
62
->loadEnv ($ dotEnvFile )
61
63
;
62
64
65
+ // Block the process until the cache clear is in progress, this must be done before the kernel is created so it doesn't
66
+ // try to use the old container
67
+ CacheClearLocker::waitUntilUnlocked (_PS_ENV_ , _PS_APP_ID_ );
68
+
63
69
$ kernel = new AdminAPIKernel (_PS_ENV_ , _PS_MODE_DEV_ );
64
70
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
65
71
//Request::enableHttpMethodParameterOverride();
Original file line number Diff line number Diff line change 23
23
* @copyright Since 2007 PrestaShop SA and Contributors
24
24
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25
25
*/
26
+
27
+ use PrestaShop \PrestaShop \Core \Util \CacheClearLocker ;
26
28
use Symfony \Component \Dotenv \Dotenv ;
27
29
use Symfony \Component \ErrorHandler \Debug ;
28
30
use Symfony \Component \HttpFoundation \Request ;
29
- use Symfony \Component \HttpFoundation \RequestStack ;
30
- use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
31
31
use Symfony \Component \HttpKernel \HttpKernelInterface ;
32
32
33
33
if (!defined ('_PS_ADMIN_DIR_ ' )) {
70
70
->loadEnv ($ dotEnvFile )
71
71
;
72
72
73
+ // Block the process until the cache clear is in progress, this must be done before the kernel is created so it doesn't
74
+ // try to use the old container
75
+ CacheClearLocker::waitUntilUnlocked (_PS_ENV_ , _PS_APP_ID_ );
76
+
73
77
$ kernel = new AdminKernel (_PS_ENV_ , _PS_MODE_DEV_ );
74
78
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
75
79
Request::enableHttpMethodParameterOverride ();
Original file line number Diff line number Diff line change 27
27
use PrestaShop \PrestaShop \Adapter \Module \Repository \ModuleRepository ;
28
28
use PrestaShop \PrestaShop \Adapter \SymfonyContainer ;
29
29
use PrestaShop \PrestaShop \Core \Exception \CoreException ;
30
- use PrestaShop \PrestaShop \Core \Util \CacheClearLocker ;
31
30
use PrestaShop \PrestaShop \Core \Version ;
32
31
use PrestaShop \TranslationToolsBundle \TranslationToolsBundle ;
33
32
use Symfony \Component \Config \Loader \LoaderInterface ;
@@ -94,7 +93,6 @@ public function registerBundles(): iterable
94
93
*/
95
94
public function boot ()
96
95
{
97
- CacheClearLocker::waitUntilUnlocked ($ this ->environment , $ this ->getAppId ());
98
96
parent ::boot ();
99
97
$ this ->cleanKernelReferences ();
100
98
}
Original file line number Diff line number Diff line change 24
24
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25
25
*/
26
26
27
+ use PrestaShop \PrestaShop \Core \Util \CacheClearLocker ;
27
28
use Symfony \Component \Dotenv \Dotenv ;
28
29
use Symfony \Component \ErrorHandler \Debug ;
29
30
use Symfony \Component \HttpFoundation \Request ;
50
51
Debug::enable ();
51
52
}
52
53
54
+ // Block the process until the cache clear is in progress, this must be done before the kernel is created so it doesn't
55
+ // try to use the old container
56
+ CacheClearLocker::waitUntilUnlocked (_PS_ENV_ , _PS_APP_ID_ );
57
+
53
58
// Starting Kernel
54
59
$ kernel = new FrontKernel (_PS_ENV_ , _PS_MODE_DEV_ );
55
60
$ request = Request::createFromGlobals ();
You can’t perform that action at this time.
0 commit comments