This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/HttpKernel
Fabien Potencier 7b8409ad37 feature #22315 Add Kernel::getProjectDir() (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add Kernel::getProjectDir()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes/no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | not yet

`Kernel::getRootDir()` is misleading. It returns the path where `AppKernel.php` is stored, which is `app/` in Symfony 2/3, but `src/` in Symfony 4. But most of the time, we are using `getRootDir()` to get the project root dir, so `%kernel.root_dir%/../` is a common idiom.

Changing the value of `getRootDir()` would be a hard BC break, so I propose to create a new method, `getProjectDir()` to "replace" `getRootDir()` gradually.

Commits
-------

1f680ccb2d added Kernel::getProjectDir()
2017-04-07 09:56:33 -07:00
..
Bundle [HttpKernel] Fix Bundle name regression 2017-01-27 07:30:57 -08:00
CacheClearer [FrameworkBundle] Allow clearing private cache pools 2016-12-10 11:52:34 +01:00
CacheWarmer Fix PHP 7.1 related failures 2016-07-19 10:44:18 +02:00
Config Conditionally add options to unserialize in PHP 7.0+. 2016-12-29 19:41:55 +01:00
Controller Revert "feature #20973 [DI] Add getter injection (nicolas-grekas)" 2017-03-25 15:07:47 +01:00
ControllerMetadata [HttpKernel] Clean ArgumentMetadataFactory::getType() 2016-10-06 11:12:13 +02:00
DataCollector [WebProfilerBundle] Improved cookie traffic 2017-03-22 21:55:42 +01:00
Debug Conditionally add options to unserialize in PHP 7.0+. 2016-12-29 19:41:55 +01:00
DependencyInjection bug #22340 [HttpKernel] Skip ContainerAwareInterface::setContainer from service_arguments actions registration (chalasr) 2017-04-07 07:44:54 -07:00
Event [HttpKernel] Deprecate X-Status-Code for better alternative 2017-02-23 21:30:09 +00:00
EventListener [HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener 2017-03-30 14:49:17 +02:00
Exception fixed CS 2016-06-29 07:42:25 +02:00
Fragment [HttpFoundation] Add $trustedHeaderSet arg to Request::setTrustedProxies() - deprecate not setting it 2017-03-22 21:29:40 +01:00
HttpCache fixed Yoda condition 2017-03-22 16:03:14 -07:00
Log Merge branch '2.3' into 2.7 2015-09-29 14:06:14 +02:00
Profiler Merge branch '2.7' into 2.8 2017-02-16 14:43:37 -08:00
Tests bug #22340 [HttpKernel] Skip ContainerAwareInterface::setContainer from service_arguments actions registration (chalasr) 2017-04-07 07:44:54 -07:00
.gitignore Fix gitignore 2014-03-04 18:06:29 +01:00
CHANGELOG.md added Kernel::getProjectDir() 2017-04-06 09:25:05 -07:00
Client.php Merge branch '3.2' 2017-02-16 14:50:29 -08:00
composer.json [VarDumper] Allow seamless use of Data clones 2017-02-27 21:09:01 +01:00
HttpKernel.php [HttpKernel] Deprecate X-Status-Code for better alternative 2017-02-23 21:30:09 +00:00
HttpKernelInterface.php remove api tags from code 2015-09-28 19:11:22 +02:00
Kernel.php feature #22315 Add Kernel::getProjectDir() (fabpot) 2017-04-07 09:56:33 -07:00
KernelEvents.php Fix event annotation for arguments resolving event 2016-10-04 15:51:31 -07:00
KernelInterface.php added Kernel::getProjectDir() 2017-04-06 09:25:05 -07:00
LICENSE updated LICENSE year 2017-01-02 12:30:00 -08:00
phpunit.xml.dist [Validator] Test DNS Email constraints using checkdnsrr() mock 2016-03-16 16:47:01 +01:00
README.md Updated all the README files 2016-03-04 08:12:06 +01:00
TerminableInterface.php remove api tags from code 2015-09-28 19:11:22 +02:00
UriSigner.php Allow a custom query string parameter 2017-03-05 11:22:32 +00:00

HttpKernel Component

The HttpKernel component provides a structured process for converting a Request into a Response by making use of the EventDispatcher component. It's flexible enough to create a full-stack framework (Symfony), a micro-framework (Silex) or an advanced CMS system (Drupal).

Resources