rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -2,7 +2,6 @@
namespace Yoast\WP\SEO;
use Exception;
use Throwable;
use WP_CLI;
use YoastSEO_Vendor\Symfony\Component\DependencyInjection\ContainerInterface;
@@ -279,16 +278,15 @@ class Loader {
/**
* Gets a class from the container.
*
* @param string $class The class name.
* @param string $class_name The class name.
*
* @return object|null The class or, in production environments, null if it does not exist.
*
* @throws Throwable If the class does not exist in development environments.
* @throws Exception If the class does not exist in development environments.
*/
protected function get_class( $class ) {
protected function get_class( $class_name ) {
try {
return $this->container->get( $class );
return $this->container->get( $class_name );
} catch ( Throwable $e ) {
// In production environments do not fatal if the class could not be constructed but log and fail gracefully.
if ( \YOAST_ENVIRONMENT === 'production' ) {