Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[HttpKernel] switched Kernel::init() method call to userland #7330

Closed
wants to merge 1 commit into from

2 participants

@bamarni
Q A
Bug fix? [yes]
New feature? [no]
BC breaks? [yes]
Deprecations? [no]
Tests pass? [yes]
Fixed tickets [#6834]
License MIT

See #6834, as @fabpot said, a fix would be to move the code to userland, I suggest to keep it in this init() method though, and tag it as api, for a few reasons :

  • assuming it's content belongs to the dev front controller is wrong, it only depends on the debug mode.
  • it can become the recommended place where one can set its application specific php ini settings (not sure if there is such place currently for a symfony project? I usually do this in my front controllers) and also set up its own debugging tools, xhprof and so.
@fabpot fabpot referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@fabpot
Owner

Closing in favor of #7441

@fabpot fabpot closed this
@fabpot fabpot referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@fabpot fabpot referenced this pull request from a commit in fabpot/symfony
@fabpot fabpot [Debug] added the component (closes #6828, closes #6834, closes #7330) 2ff0927
@fabpot fabpot referenced this pull request from a commit
@fabpot fabpot merged branch fabpot/debug-component (PR #7441)
This PR was merged into the master branch.

Discussion
----------

[Debug] added the component (closes #6828, closes #6834, closes #7330)

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #6828, #6834, #7330
| License       | MIT
| Doc PR        | symfony/symfony-docs#2479

You can use the individual tools, or register them all:

```php
use Symfony\Component\Debug\Debug;

Debug::enable();
```

Changes in Symfony SE: symfony/symfony-standard#523

Commits
-------

f693128 fixed typos
1ab1146 [Debug] fixed minor bugs
daa3a3c [Debug] changed composer to accept more versions
e455269 [Debug] ensured that the Debug tools can only be registered once
946bfb2 [Debug] made the exception handler independant of HttpFoundation
2b305c2 added a main Debug class to ease integration
2ff0927 [Debug] added the component (closes #6828, closes #6834, closes #7330)
6d552c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 26 additions and 2 deletions.
  1. +19 −0 UPGRADE-2.3.md
  2. +7 −2 src/Symfony/Component/HttpKernel/Kernel.php
View
19 UPGRADE-2.3.md
@@ -0,0 +1,19 @@
+UPGRADE FROM 2.2 to 2.3
+=======================
+
+### HttpKernel
+
+ * The `init()` method has to be called after Kernel instanciation.
+
+ Before:
+
+ ```
+ $kernel = new AppKernel('dev', true);
+ ```
+
+ After:
+
+ ```
+ $kernel = new AppKernel('dev', true);
+ $kernel->init();
+ ```
View
9 src/Symfony/Component/HttpKernel/Kernel.php
@@ -90,10 +90,15 @@ public function __construct($environment, $debug)
if ($this->debug) {
$this->startTime = microtime(true);
}
-
- $this->init();
}
+ /**
+ * Initialize the Kernel.
+ *
+ * This is the right place to deal with PHP ini settings, debugging tools, etc.
+ *
+ * @api
+ */
public function init()
{
ini_set('display_errors', 0);
Something went wrong with that request. Please try again.