Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Symfony\Component\ClassLoader\ApcClassLoader depreceated

Open
#9 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
php, symfony
Domain
backend

Research direction

Start by inspecting settings.php and the shown ApcClassLoader setup, then check the Symfony v4 deprecation guidance to determine the supported replacement. Done means the settings configuration no longer throws an error while preserving the intended class-loader behavior.

Written by the indexing model from the issue text.

Description

since v4 of Symfony Symfony\Component\ClassLoader\ApcClassLoader is deprecated meaning the following code in settings.php throws an error

if ($settings['hash_salt']) {
  $prefix = 'drupal.' . hash('sha256', 'drupal.' . $settings['hash_salt']);
  $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader);
  unset($prefix);
  $class_loader->unregister();
   $apc_loader->register();
  $class_loader = $apc_loader;
}

Not too familiar with ApcClassLoader to know what the alternative is.

Dominant language
PHP
Stars
46
Forks
24
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-samples/eb-php-drupal

All issues in aws-samples/eb-php-drupal

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.