Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Installation system
    • Labels:
      None

      Description

      ( ! ) Fatal error: Uncaught exception 'ReflectionException' with message 'Class does not exist' in /home/pie/apps/git-phpbb/deps/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 762
      ( ! ) ReflectionException: Class does not exist in /home/pie/apps/git-phpbb/deps/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 762
      Call Stack

      1. Time Memory Function Location
        1 0.0014 385384 {main}

        ( ) ../index.php:0
        2 0.1720 4353760 Symfony\Component\DependencyInjection\ContainerBuilder->get( ) ../index.php:105
        3 0.1721 4361272 Symfony\Component\DependencyInjection\ContainerBuilder->createService( ) ../ContainerBuilder.php:353
        4 0.1723 4362088 Symfony\Component\DependencyInjection\ContainerBuilder->resolveServices( ) ../ContainerBuilder.php:749
        5 0.1723 4362888 Symfony\Component\DependencyInjection\ContainerBuilder->resolveServices( ) ../ContainerBuilder.php:828
        6 0.1724 4362968 Symfony\Component\DependencyInjection\ContainerBuilder->get( ) ../ContainerBuilder.php:831
        7 0.1725 4379112 Symfony\Component\DependencyInjection\ContainerBuilder->createService( ) ../ContainerBuilder.php:353
        8 0.1726 4379672 Symfony\Component\DependencyInjection\ContainerBuilder->resolveServices( ) ../ContainerBuilder.php:749
        9 0.1726 4380248 Symfony\Component\DependencyInjection\ContainerBuilder->resolveServices( ) ../ContainerBuilder.php:828
        10 0.1726 4380328 Symfony\Component\DependencyInjection\ContainerBuilder->get( ) ../ContainerBuilder.php:831
        11 0.1728 4405024 Symfony\Component\DependencyInjection\ContainerBuilder->createService( ) ../ContainerBuilder.php:353
        12 0.1729 4405376 ReflectionClass->__construct( ) ../ContainerBuilder.php:762

      (18:12:33) igorw: nn-1: I think injecting db into cache broke installation
      (18:14:03) igorw: on the install/index.php db.conn does not exist
      (18:18:42) igorw: however I think I may have found a relatively clean way to fix it
      (18:19:33) igorw: it looks like the only reason we need $cache at all is because of obtain_hooks(), so if we extract that into a separate class, we only need to change those calls to use the new one
      (18:19:58) igorw: and it only needs to be changed in 3 place
      (18:19:59) igorw: s

        Issue Links

          Activity

          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          (19:00:43) nn-: confirmed develop is broken
          (19:03:11) nn-1: http://tracker.phpbb.com/browse/PHPBB3-11305
          (19:06:09) nn-1: the solution to me seems that installer should use a null cache
          (19:06:43) nn-1: igorw: you here?
          (19:20:05) igorw: nn-1: yes
          (19:20:26) igorw: null cache might work as well
          (19:20:26) nn-1: i want to tell container to use null cache in installer
          (19:20:30) nn-1: $container->register('cache.driver', 'phpbb_cache_driver_null');
          (19:20:33) nn-1: trying that
          (19:20:40) nn-1: in phpbb_create_install_container
          (19:21:05) nn-1: ReflectionException: Class does not exist in /home/pie/apps/git-phpbb/deps/Symfony/Component/DependencyInjection/ContainerBuilder.php
          (19:21:12) nn-1: apparently class name becomes null at some point
          (19:21:16) nn-1: any ideas?
          (19:21:52) igorw: there is already special handling for this
          (19:22:43) igorw: phpbb_create_install_container() already does this:
          (19:22:44) igorw: $container->setAlias('cache.driver', 'cache.driver.install');
          (19:23:16) igorw: so if you look in services.yml, you'll see that cache.driver.install currently sets it to file
          (19:23:23) igorw: change that to null, problem solved
          (19:24:16) igorw: hm, well actually the entire problem is not solved
          (19:25:05) igorw: changing to a null driver will not fix anything, because the actual problem is that the db driver is injected into the cache service
          (19:25:17) igorw: the cache service will still be created, even with the null cache driver
          (19:25:20) nn-1: still dying
          (19:25:23) igorw: and thus, db will still be injected
          (19:25:27) nn-1: meh
          (19:25:29) nn-1: why is this
          (19:26:03) igorw: we need to split the hooks stuff out, imo that's the only solution
          (19:26:41) nn-1: well the cache service is not a cache service
          (19:26:59) nn-1: it's a service that retrieves a bunch of unrelated stuff and happens to use a cache driver
          (19:27:15) igorw: yeah, it's more like a cached_service. the naming is still horrible, I agree
          (19:27:31) ***nn-1 checks to see who came up with it
          (19:28:00) nn-1: i think it was you
          (19:28:01) igorw: it was me, I renamed from "cache extends acm"
          (19:29:00) nn-1: i guess that was still an improvement
          (19:29:05) igorw: that PR was only changing it to use composition; did not want to put other changes in there
          (19:29:29) igorw: I'm not at all opposed to giving it a better name
          (19:29:49) igorw: and once the hooks aren't in there anymore, it will have mostly db queries in there
          (19:29:52) nn-1: are you one of the people objecting to pulling stuff out of container?
          (19:30:06) nn-1: 1. create a class just for hooks
          (19:30:10) nn-1: 2. put in container
          (19:30:15) nn-1: 3. anyone who needs it can get it from container
          (19:30:42) igorw: pretty much. what do you mean by pulling stuff out of container?
          (19:30:51) stodan left the room (quit: Quit: Over & Out).
          (19:31:00) nn-1: $instance = $container->get('service.name');
          (19:32:04) nn-1: actually i may not care for this fight
          (19:32:15) nn-1: pie@reactor phpbb % git grep obtain_hooks
          (19:32:15) nn-1: phpBB/common.php:foreach ($cache->obtain_hooks() as $hook)
          (19:32:15) nn-1: phpBB/includes/cache/service.php: function obtain_hooks()
          (19:32:15) nn-1: phpBB/install/database_update.php: foreach ($cache->obtain_hooks() as $hook)
          (19:32:15) nn-1: phpBB/install/index.php: foreach ($cache->obtain_hooks() as $hook)
          (19:32:32) nn-1: i think those can be fixed in 50 lines of code anyway
          (19:33:11) nn-1: hooks_manager ok?
          (19:35:07) nn-1: hook_manager maybe
          (19:35:11) igorw: hook_finder?
          (19:35:16) nn-1: sure
          (19:35:29) igorw: manager is so generic, I try to avoid it

          Show
          Oleg Oleg [X] (Inactive) added a comment - (19:00:43) nn-: confirmed develop is broken (19:03:11) nn-1: http://tracker.phpbb.com/browse/PHPBB3-11305 (19:06:09) nn-1: the solution to me seems that installer should use a null cache (19:06:43) nn-1: igorw: you here? (19:20:05) igorw: nn-1: yes (19:20:26) igorw: null cache might work as well (19:20:26) nn-1: i want to tell container to use null cache in installer (19:20:30) nn-1: $container->register('cache.driver', 'phpbb_cache_driver_null'); (19:20:33) nn-1: trying that (19:20:40) nn-1: in phpbb_create_install_container (19:21:05) nn-1: ReflectionException: Class does not exist in /home/pie/apps/git-phpbb/deps/Symfony/Component/DependencyInjection/ContainerBuilder.php (19:21:12) nn-1: apparently class name becomes null at some point (19:21:16) nn-1: any ideas? (19:21:52) igorw: there is already special handling for this (19:22:43) igorw: phpbb_create_install_container() already does this: (19:22:44) igorw: $container->setAlias('cache.driver', 'cache.driver.install'); (19:23:16) igorw: so if you look in services.yml, you'll see that cache.driver.install currently sets it to file (19:23:23) igorw: change that to null, problem solved (19:24:16) igorw: hm, well actually the entire problem is not solved (19:25:05) igorw: changing to a null driver will not fix anything, because the actual problem is that the db driver is injected into the cache service (19:25:17) igorw: the cache service will still be created, even with the null cache driver (19:25:20) nn-1: still dying (19:25:23) igorw: and thus, db will still be injected (19:25:27) nn-1: meh (19:25:29) nn-1: why is this (19:26:03) igorw: we need to split the hooks stuff out, imo that's the only solution (19:26:41) nn-1: well the cache service is not a cache service (19:26:59) nn-1: it's a service that retrieves a bunch of unrelated stuff and happens to use a cache driver (19:27:15) igorw: yeah, it's more like a cached_service. the naming is still horrible, I agree (19:27:31) ***nn-1 checks to see who came up with it (19:28:00) nn-1: i think it was you (19:28:01) igorw: it was me, I renamed from "cache extends acm" (19:29:00) nn-1: i guess that was still an improvement (19:29:05) igorw: that PR was only changing it to use composition; did not want to put other changes in there (19:29:29) igorw: I'm not at all opposed to giving it a better name (19:29:49) igorw: and once the hooks aren't in there anymore, it will have mostly db queries in there (19:29:52) nn-1: are you one of the people objecting to pulling stuff out of container? (19:30:06) nn-1: 1. create a class just for hooks (19:30:10) nn-1: 2. put in container (19:30:15) nn-1: 3. anyone who needs it can get it from container (19:30:42) igorw: pretty much. what do you mean by pulling stuff out of container? (19:30:51) stodan left the room (quit: Quit: Over & Out). (19:31:00) nn-1: $instance = $container->get('service.name'); (19:32:04) nn-1: actually i may not care for this fight (19:32:15) nn-1: pie@reactor phpbb % git grep obtain_hooks (19:32:15) nn-1: phpBB/common.php:foreach ($cache->obtain_hooks() as $hook) (19:32:15) nn-1: phpBB/includes/cache/service.php: function obtain_hooks() (19:32:15) nn-1: phpBB/install/database_update.php: foreach ($cache->obtain_hooks() as $hook) (19:32:15) nn-1: phpBB/install/index.php: foreach ($cache->obtain_hooks() as $hook) (19:32:32) nn-1: i think those can be fixed in 50 lines of code anyway (19:33:11) nn-1: hooks_manager ok? (19:35:07) nn-1: hook_manager maybe (19:35:11) igorw: hook_finder? (19:35:16) nn-1: sure (19:35:29) igorw: manager is so generic, I try to avoid it

            People

            • Assignee:
              Unassigned
              Reporter:
              Oleg Oleg [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development