Skip to content

Use prependLocation() instead of addLocation() to allow overriding theme after boot#36

Merged
kirkbushell merged 2 commits intofloatingpointsoftware:masterfrom
darron1217:allow-overriding
May 3, 2018
Merged

Use prependLocation() instead of addLocation() to allow overriding theme after boot#36
kirkbushell merged 2 commits intofloatingpointsoftware:masterfrom
darron1217:allow-overriding

Conversation

@darron1217
Copy link
Contributor

Related to #35

@darron1217
Copy link
Contributor Author

@kirkbushell Ping
Is this package not maintaining anymore?

@kirkbushell
Copy link
Contributor

@darron1217 it is, just a bit busy is all.

Thanks for this, will test, merge then release.

@darron1217
Copy link
Contributor Author

@kirkbushell Okay
Anyway, thanks for all the works you did 👍
I'll look forward to be merged :)

@darron1217
Copy link
Contributor Author

darron1217 commented Apr 21, 2018

@kirkbushell Ping
I'm sorry for calling you again, but it's really simple PR...
Can you check it for a second?

This PR only changes the order of view.
addLocation() makes view like this

addLocation('one');
addLocation('two');
addLocation('three');
$result == ['one', 'two', 'three'];

It makes laravel reads the first matching view one

So I changed method into prependLocation()

prependLocation('one');
prependLocation('two');
prependLocation('three');
$result == ['three', 'two', 'one'];

No laravel reads the first matching view three, which makes view to be overrided after application boot

@darron1217
Copy link
Contributor Author

@kirkbushell Ping

@kirkbushell
Copy link
Contributor

Thanks @darron1217 . Apologies, lots going on atm - I'll get to this tonight. Thanks again.

@darron1217
Copy link
Contributor Author

darron1217 commented May 1, 2018

Was there any problem about this PR?

@kirkbushell
Copy link
Contributor

kirkbushell commented May 3, 2018

@darron1217 yes. Tests fail. prependLocation doesn't even seem like it's available. I think it needs a laravel update, which I'll look into.

@darron1217
Copy link
Contributor Author

Okay.. I found the reason

https://laravel.com/api/5.4/Illuminate/View/FileViewFinder.html#method_prependLocation

This method is available from version 5.4

@darron1217
Copy link
Contributor Author

"illuminate/support": "~5.0"

We must change this line into

 "illuminate/support": "~5.4" 

@kirkbushell
Copy link
Contributor

Yeah, I tried a few different versions but cannot update to that version just yet. 5.4 is a long way from 5.0, which is where this package was sitting. I've brought it up to 5.1, as I believe that's an LTS release, and I'll release another update for 5.4 and above in a separate version chain so you can use it right away.

@darron1217
Copy link
Contributor Author

@kirkbushell Okay then
How about checking out current master as branch laravel-5.1 and start developing which is based on 5.4?

@kirkbushell
Copy link
Contributor

Yup, I'll do exactly that but it will need to wait until later tonight. Thanks for being patient :)

@darron1217
Copy link
Contributor Author

Anyway, I realized that laravel 5.5 is LTS (Also php version constraint has changed to 7 on this version)
So let's skip 5.4 and go straight to 5.5 support :)

@kirkbushell
Copy link
Contributor

Yup, sounds good to me :)

This was referenced May 13, 2018
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