Skip to content

Commit

Permalink
WIP: autowired/compiled service container
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcdawkins committed Nov 27, 2024
1 parent 942efa6 commit 1bfcfe5
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 451 deletions.
Empty file removed .platform/services.yaml
Empty file.
1 change: 1 addition & 0 deletions config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/cache
48 changes: 48 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Configuration file for services (dependency injection).
#
# See https://symfony.com/doc/current/service_container.html
services:
_defaults:
autowire: true
autoconfigure: false
public: false

# Set up all classes in src/Command as console commands.
Platformsh\Cli\Command\:
resource: '../src/Command/*'
tags: [console.command]

# Set up all classes in src/Service as services automatically.
Platformsh\Cli\Service\:
resource: '../src/Service/*'

# A few services are not inside the \Platformsh\Cli\Service namespace.
Platformsh\Cli\Local\ApplicationFinder: {}
Platformsh\Cli\Local\LocalBuild: {}
Platformsh\Cli\Local\LocalProject:
public: true
Platformsh\Cli\SshCert\Certifier: {}

# A couple of other services have to be public.
Platformsh\Cli\Service\LegacyMigration:
public: true
Platformsh\Cli\Service\SelfUpdateChecker:
public: true

# Configure the cache service, which is created via a factory.
Doctrine\Common\Cache\CacheProvider:
public: true
factory: 'Platformsh\Cli\Service\CacheFactory::createCacheProvider'
arguments: ['@Platformsh\Cli\Service\Config']

# Configure synthetic services, which are created and set after the
# container is compiled.
Platformsh\Cli\Application:
public: true
synthetic: true
Symfony\Component\Console\Output\OutputInterface:
public: true
synthetic: true
Symfony\Component\Console\Input\InputInterface:
public: true
synthetic: true
165 changes: 0 additions & 165 deletions services.yaml

This file was deleted.

Loading

0 comments on commit 1bfcfe5

Please sign in to comment.