Laravel Valet Nette Support

3 years ago

wise
Member | 162
+
+2
-

Few weeks ago Laravel's team published their new tool Valet (https://github.com/laravel/valet).

I need to write new driver for my Nette applications, my question is, “What is the best way to identify Nette framework from files?”

Take a look at current drivers, specially their method serves.

https://github.com/…/cli/drivers

For example Wordpress is defined by wp-config.php file (https://github.com/…etDriver.php), Symfony this way: https://github.com/…etDriver.php.

What do you think?

Thank you.

Jakub

3 years ago

Myiyk
Member | 321
+
0
-

Project is probably running on Nette FW, if exist directory vendor/nette/application

------ edit ------

Majkl578 wrote:

Besides presence in vendor, app/bootstrap.php and www/.maintenance.php could be also considered unique for Nette (especially if you check its contents). www/index.php only if you check its contents. Maybe also any *.neon file inside app/config.
Actually I think relying on vendor/nette is not a good approach since many users may use just a single component, e.g. nette/utils in non-Nette (e.g. in Symfony) application.

is better

Last edited by Myiyk (2016-05-22 00:34)

3 years ago

wise
Member | 162
+
0
-

@Myiyk: Yes, thats true, now I'm using check against vendor/nette dir existence, but after I checked other drivers, I'm not sure about vendor directory. I'm not sure if it is the right way to check – why don't other use this directory to check an existence?

3 years ago

Myiyk
Member | 321
+
0
-

For most Nette aplication exist file app/bootstrap.php, but it is too much universal name.

Nette configuration can be anywhere, source codes are loaded by robot loader, so they too can be anywhere.

Nette doesn't have solid structure.

3 years ago

wise
Member | 162
+
0
-

Ok, hope the vendor folder is enough. Thank you.

3 years ago

Majkl578
Moderator | 1379
+
+1
-

Besides presence in vendor, app/bootstrap.php and www/.maintenance.php could be also considered unique for Nette (especially if you check its contents). www/index.php only if you check its contents. Maybe also any *.neon file inside app/config.
Actually I think relying on vendor/nette is not a good approach since many users may use just a single component, e.g. nette/utils in non-Nette (e.g. in Symfony) application.

3 years ago

Myiyk
Member | 321
+
0
-

vendor/nette will be exist if project use etc. forms, but vendor/nette/application exist if project use presenters. Nette/Application is core of Nette projects.

3 years ago

Majkl578
Moderator | 1379
+
+1
-

but vendor/nette/application exist if project use presenters. Nette/Application is core of Nette projects.

Or it might just be an indirect dependency of any of your dependencies… nette/application has 327 known dependents on Packagist

3 years ago

Myiyk
Member | 321
+
0
-

You are right.

Majkl578 wrote:

Besides presence in vendor, app/bootstrap.php and www/.maintenance.php could be also considered unique for Nette (especially if you check its contents). www/index.php only if you check its contents. Maybe also any *.neon file inside app/config.
Actually I think relying on vendor/nette is not a good approach since many users may use just a single component, e.g. nette/utils in non-Nette (e.g. in Symfony) application.

is best solution

Last edited by Myiyk (2016-05-22 00:32)