wouterj
Repos
270
Followers
351

Integrates the Eloquent ORM in the Symfony framework

154
35

The Symfony documentation

1989
4731

A PEG parser written in PHP

19
4

Events

issue comment
CSP is not removed for exception pages in 6.1.4

@iquito do you have time to open a PR with this change (and a test case proofing the bug)?

What you're describing makes sense to me, and we've found this behavior in another profiler-related bug as well (#47577).

Created at 1 day ago
issue comment
security-http (LogoutUrlGenerator) error

Thanks to @krzyc's reproducer and git-bisect, I've been able to track this down to this change: https://github.com/symfony/symfony/pull/47358

This has been identified in another profiler related issue as well: https://github.com/symfony/symfony/issues/47405#issuecomment-1231572367

If someone wants to investigate further, please do so :)

Created at 1 day ago
delete branch
wouterj delete branch security-helper
Created at 1 day ago
issue comment
Updating symfony/http-foundation (v6.1.4 => v6.1.5) brokes file download

Not true. We were (guilty and wrongly) using it in 3 different projects and it worked (since a lot of time, about 2 year the oldest commit).

It has worked by the shear luck that the automatic content type algorithm produced the same content type as you were passing. Doing $response->headers->allPreserveCaseWithoutCookies() (which is what is send to the client) shows 0 => "Content-Type: application/json" in any version of Symfony.

I think laravel doc team should add a small example

I'm sure they welcome contributions :)

Created at 1 day ago
closed issue
Changing the parsing of headers reflects in trouble in laravel projects

Symfony version(s) affected

6.1.5 (version of symfony/http-foundation)

Description

this was the sintax we used to use.

Note $headers

public function showPdf($id)
{
    $headers = [
        'Content-Type: application/pdf',
    ];

  ... cutted ..

    return response()->file($pathToFile,$headers);
}

This will not work anymore since 6.1.5 of this package

Now this works , but we must fix EVERY SINGLE LARAVEL PROJECT

    $headers = [
        'Content-Type' => 'application/pdf',
    ];

How to reproduce

I am able to reproduce only in a laravel project

Possible Solution

I ask for a revert

Additional Context

No response

Created at 1 day ago
issue comment
Changing the parsing of headers reflects in trouble in laravel projects

I agree with @stof here and closing here as the referenced PR has been merged.

I recommend you still update your projects to use the associative array, as the code you show does indeed not work as intended (in any version of Symfony).

Created at 1 day ago
issue comment
Move the new Security helper to the root of SecurityBundle

👍 Should make @javiereguiluz happy as he was challenging that redundancy issue when the class was introduced :)

Haha, I vaguely remembered this discussion, but couldn't find it anywhere. I believe I was against this change back then, but seeing the class name in the docs changed my mind :)

Created at 1 day ago
pull request opened
Move the new Security helper to the root of SecurityBundle

| Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | -

While merging symfony/symfony-docs#17284 , I found this rather repeating FQCN: ...\SecurityBundle\Security\Security. Security is important, but let's move the class one level up to make the FQCN not unnecessarily long.

Created at 1 day ago
create branch
wouterj create branch security-helper
Created at 1 day ago
closed issue
Document how to "integration" test private services

Question:

What if you do container->get() some services in tests.

Answer:

The proper solution would be to create a public alias for the service you want to test in the test environment only:

# app/config/config_test.yml
services:
    test_alias.AppBundle\Service\MyService:
        alias: 'AppBundle\Service\MyService'
        public: true # require on SF4, where everything is private by default

Then, you would actually fetch test_alias.AppBundle\Service\MyService out of the container in your unit test. It's a nice idea too: you only need to expose your service as public in the test environment.

Created at 1 day ago
pull request closed
[Security] Add documentation for programmatic login

Add documentation for programmatic login

Fixes #16940

Created at 1 day ago
closed issue
[Security] Add a method in the security helper to ease programmatic login

| Q | A | ------------ | --- | Feature PR | symfony/symfony#41274 | PR author(s) | @johnkrovitch, @chalasr | Merged in | 6.2

Created at 1 day ago

[Security] Add documentation for programmatic login

feature #17284 [Security] Add documentation for programmatic login (johnkrovitch)

This PR was squashed before being merged into the 6.2 branch.

Discussion

[Security] Add documentation for programmatic login

Add documentation for programmatic login

Fixes #16940

Commits

b63ccf763 [Security] Add documentation for programmatic login

Created at 1 day ago
issue comment
[Security] Add documentation for programmatic login

Thank you @johnkrovitch! I've edited your changes a bit, mostly reducing the information of more advanced usages down to a single code example. Very cool to finally have this feature in Symfony :)

Created at 1 day ago

[Security] Add documentation for programmatic login

Created at 1 day ago

Show available commands in namespace when running namespace as command

Created at 2 days ago
issue comment
Updating symfony/http-foundation (v6.1.4 => v6.1.5) brokes file download

For information of other Laravel users ending up here instead of in the Symfony issue:

Passing the headers as a list (['Content-Type: application/pdf']) has never worked, an associative array (['Content-Type' => 'application/pdf']) works.

It appears 6.1.5 includes a bug in the automatic configuration of content-type. As the content-type header was never understood, code using this is relying on the automatic configuration.

Created at 2 days ago
pull request opened
[Console] Show available commands in namespace when running namespace as command

| Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | - | License | MIT | Doc PR | n/a

Another little UX improvement found in the Docker CLI: When running the namespace as a command (e.g. bin/console make), instead of showing an error "this command does not exist", show the list of sub-commands in that namespace.

I've kept the exit code and dispatching of the error event in place, to avoid any BC breaks on this matter.

Created at 2 days ago

Show available commands in namespace when running namespace as command

Created at 2 days ago
create branch
wouterj create branch console-list-namespace
Created at 2 days ago
issue comment
Changing the parsing of headers reflects in trouble in laravel projects

Please share what "does not work" means and how you know that this is related to the HttpFoundation component (as you say you can only reproduce in a Laravel project and the code example you showed is not from Symfony).

Created at 3 days ago
delete branch
wouterj delete branch console-section-height
Created at 3 days ago

Add support for array with keys

Created at 3 days ago

Fix README syntax

Created at 3 days ago

Fix README syntax

Created at 3 days ago
create branch
wouterj create branch main
Created at 3 days ago