diff --git a/src/BladeService.php b/src/BladeService.php index 46a71f7e..4cb22e9c 100644 --- a/src/BladeService.php +++ b/src/BladeService.php @@ -91,7 +91,6 @@ public function preStoreUncompiledBlocks(string $input): string $reflection = new \ReflectionClass($compiler); $storeVerbatimBlocks = $reflection->getMethod('storeUncompiledBlocks'); - $storeVerbatimBlocks->setAccessible(true); return $storeVerbatimBlocks->invoke($compiler, $input); } @@ -102,7 +101,6 @@ public function preCompileComments(string $input): string $reflection = new \ReflectionClass($compiler); $storeVerbatimBlocks = $reflection->getMethod('compileComments'); - $storeVerbatimBlocks->setAccessible(true); return $storeVerbatimBlocks->invoke($compiler, $input); } @@ -129,7 +127,6 @@ public function componentNameToPath($name): string $reflection = new \ReflectionClass($compiler); $pathsProperty = $reflection->getProperty('anonymousComponentPaths'); - $pathsProperty->setAccessible(true); $paths = $pathsProperty->getValue($compiler) ?? []; // Handle namespaced components... @@ -224,8 +221,6 @@ protected function freezeObjectProperties(object $object, array $properties) $property = $reflection->getProperty($name); - $property->setAccessible(true); - $frozen[$name] = $property->getValue($object); if (! is_numeric($key)) { @@ -238,7 +233,6 @@ protected function freezeObjectProperties(object $object, array $properties) function () use ($reflection, $object, $frozen) { foreach ($frozen as $name => $value) { $property = $reflection->getProperty($name); - $property->setAccessible(true); $property->setValue($object, $value); } },