Skip to content

[9.x] Fix undefined constant error when use slot name as key of object - #42943

Merged
taylorotwell merged 3 commits into
laravel:9.xfrom
monurakkaya:slot-name-as-object-key-with-tests
Jun 27, 2022
Merged

[9.x] Fix undefined constant error when use slot name as key of object#42943
taylorotwell merged 3 commits into
laravel:9.xfrom
monurakkaya:slot-name-as-object-key-with-tests

Conversation

@monurakkaya

Copy link
Copy Markdown
Contributor

It's solution for #42932

I've described problem in the issue.

With 9.15 and after we cannot use <x-slot :name="$model->name"> because it is rendering as

<?php $__env->slot($model>name, null, []); ?>

instead

<?php $__env->slot($model->name, null, []); ?>

@monurakkaya monurakkaya changed the title Slot name as object key with tests [9.x] Fix undefined constant error when use slot name as key of object Jun 24, 2022
@monurakkaya

Copy link
Copy Markdown
Contributor Author

@taylorotwell I’ve added the test which will fail on 9.15 - 9.18 tags.

@taylorotwell
taylorotwell merged commit 3b3a568 into laravel:9.x Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants