Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Routing] allow HEAD method to be defined first#23618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:3.3fromDavidBadura:patch-php-matcher-dumper
Jul 22, 2017
Merged

[Routing] allow HEAD method to be defined first#23618

fabpot merged 1 commit intosymfony:3.3fromDavidBadura:patch-php-matcher-dumper
Jul 22, 2017

Conversation

@DavidBadura
Copy link
Contributor

QA
Branch?3.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

Since 3.3 it's no longer possible to set the allowed methods to HEAD followed by GET. If you try this you get anNotice: Undefined offset: 0 error.

index:  path: '/'  defaults:    _controller: AppBundle:Default:index  methods: [HEAD, GET]

It works perfectly if you change the ordering of the allowed methods:

index:  path: '/'  defaults:    _controller: AppBundle:Default:index  methods: [GET, HEAD]

The problem has been added in this commit:dd647ff#diff-3b72491a9ba1cff58442b845ae837eb3R297

After anarray_filter the keys will not be reset. So the key0 does not exist anymore and this checkif ('$methods[0]' !== \$$methodVariable) { fails. A simplearray_values ​​fix this issue.

@DavidBaduraDavidBadura changed the titleRouter: allow HEAD method to be defined first[Routing] allow HEAD method to be defined firstJul 21, 2017
@symfonysymfony deleted a comment fromJasonCoalJul 22, 2017
@fabpot
Copy link
Member

Thank you@DavidBadura.

DavidBadura reacted with hooray emoji

@fabpotfabpot merged commit52e2821 intosymfony:3.3Jul 22, 2017
fabpot added a commit that referenced this pull requestJul 22, 2017
This PR was merged into the 3.3 branch.Discussion----------[Routing] allow HEAD method to be defined first| Q             | A| ------------- | ---| Branch?       | 3.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Since 3.3 it's no longer possible to set the allowed methods to HEAD followed by GET. If you try this you get an `Notice: Undefined offset: 0` error.```index:  path: '/'  defaults:    _controller: AppBundle:Default:index  methods: [HEAD, GET]```It works perfectly if you change the ordering of the allowed methods:```index:  path: '/'  defaults:    _controller: AppBundle:Default:index  methods: [GET, HEAD]```The problem has been added in this commit:dd647ff#diff-3b72491a9ba1cff58442b845ae837eb3R297After an `array_filter` the keys will not be reset. So the key `0` does not exist anymore and this check `if ('$methods[0]' !== \$$methodVariable) {` fails. A simple `array_values` ​​fix this issue.Commits-------52e2821 Router: allow HEAD method to be defined first
@DavidBaduraDavidBadura deleted the patch-php-matcher-dumper branchJuly 22, 2017 09:49
@fabpotfabpot mentioned this pull requestAug 1, 2017
@JasonCoal
Copy link

JasonCoal commentedAug 24, 2017 via email

---------- Forwarded message ----------From: "John Johnson" <notifications@github.com<mailto:notifications@github.com>>Date: Aug 21, 2017 9:41 PMSubject: [getsentry/sentry] NoClassDefFoundError java.nio.file.Path (#5939)To: "getsentry/sentry" <sentry@noreply.github.com<mailto:sentry@noreply.github.com>>Cc: "Subscribed" <subscribed@noreply.github.com<mailto:subscribed@noreply.github.com>>Sentry Android Version: 1.5.0When I call Sentry.capture("This is a test") I get the following error and stacktrace.java.lang.NoClassDefFoundError: Failed resolution of: Ljava/nio/file/Path; at io.sentry.marshaller.json.SentryJsonGenerator.writeObject(SentryJsonGenerator.java:75) at io.sentry.marshaller.json.SentryJsonGenerator.writeObject(SentryJsonGenerator.java:60) at com.fasterxml.jackson.core.JsonGenerator.writeObjectField(JsonGenerator.java:1662) at io.sentry.marshaller.json.JsonMarshaller.writeContexts(JsonMarshaller.java:317) at io.sentry.marshaller.json.JsonMarshaller.writeContent(JsonMarshaller.java:195) at io.sentry.marshaller.json.JsonMarshaller.marshall(JsonMarshaller.java:157) at io.sentry.connection.HttpConnection.doSend(HttpConnection.java:155) at io.sentry.connection.AbstractConnection.send(AbstractConnection.java:71) at io.sentry.connection.BufferedConnection.send(BufferedConnection.java:102) at io.sentry.connection.AsyncConnection$EventSubmitter.run(AsyncConnection.java:171) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)Possibly relevant configuration compileSdkVersion 25 buildToolsVersion '26' defaultConfig { minSdkVersion 17 targetSdkVersion 25 }—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub<getsentry/sentry#5939>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOXMGJIid4AWxT2MJA-7b56KNyx5wkiAks5sajHJgaJpZM4O-Ash>.

@sstok
Copy link
Contributor

Go home GitHub your drunk... 🍺

ogizanagi and jvasseur reacted with laugh emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@DavidBadura@fabpot@JasonCoal@sstok@ogizanagi@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp