-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: create spark.php in system/, require by spark #8779
Conversation
Ready to review 👍 , we can have |
Co-authored-by: kenjis <[email protected]>
I don't think we need to have
|
// LOAD OUR PATHS CONFIG FILE | ||
// This is the line that might need to be changed, depending on your folder structure. | ||
require FCPATH . '../app/Config/Paths.php'; | ||
// ^^^ Change this line if you move your application folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, we cannot modify system/spark.php
.
How do we do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see, the idea is to reduce manual change
The another way is make php requirment in single file under system, can also read CodeIgniter composer.json (yes, it make another include/read file, but reduce maintenance needs), eg: system/requirement.php
so it included in both spark and public/index.php so once requirement change, it will only require composer up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another way is make app/Config/Paths.php
as an .env
value, eg
APP_CONFIG_PATHS = "app/Config/Paths.php"
so it configurable there, default no data, fallback to default path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think including system/requirement.php
is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, $paths->systemDirectory
is not needed here, as already inside the directory, I will create new commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it needed on exit(Boot::bootSpark($paths));
as pass Paths
object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the Paths
instance first.
.env
is loaded in Boot
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, closing for now.
I like the concept but I see the issues with implementation. Not opposed to another attempt but I think @kenjis' recent changes to Boot help a lot already. |
Description
Reduce repetitive copy paste manual when run composer update.
Checklist: