Talk Laravel 5.5 "auto-discovery"

What ThinkSNS that?

ThinkSNS (referred to as TS), a fully integrated platform for social systems, for domestic and foreign medium and small enterprises and entrepreneurs to social software development and technical solutions, the latest version ThinkSNS +, ThinkSNS V4, ThinkSNS [Jane].

Read Package Auto-Discovery In Laravel 5.5 Taylor Otwell published the first reaction is "embarrassing"

Why. . .

Also blame me, before developing dynamically developing code forgotten see 5.5, the previous article also mentioned in ThinkSNS + development scenario, we can not allow users to config / app.php modify the configuration, so in order to solve problems loading packages , Laravel we developed an enhanced version of the service provider can look at plus / doc / pakcage

Yes, the enhanced version of the service provider, add features as follows:

l can load other friendly "service providers" (which need to rely on other laravel in the development kit when the expansion pack useful)

l service provider to composer.json configuration (without changing the configuration of)

l For more friendly package publish (Laravel the vendor: publish asked to enter the service provider classes, we only ask for the package name)

l processor, a simplified version of the command can be written with a simple processing method of a function.

See the second to know, and auto-discovery 5.5 laravel similar, we are recording the service provider information in bootstrap / cache / providers.php rather Laravel 5.5 is written to the bootstrap / cache find in the vendor directory /package.php.

Yes, we realize the idea almost, but we support more features. Read the list of service providers from here, then Illuminate \ Foundation \ Application :: registerConfiguredProviders service providers merge function, then load, you can continue to load the service provider from the service provider in.

About my feelings, happy, happy, Laravel easier to use, and another mood, melancholy, because after I developed this feature in ThinkSNS +, the company achieved almost all packages in this manner.

You will say, these package configuration field settings without enough thing? However, before such a way not finalized, has been modified once, do they need to be modified once after more than a month? Appalling ah! ! ! I was afraid I would be hit, think about a little pain.

The group said today in this topic, a developer: "Ha ha, I finally developed a picture in picture function", then Google: "Android 8 native support." In fact, the same reason, not because of the official native support for the poor, but tangled with the official? Or continue to maintain their own? Its not necessarily good official, official support is more stable.

Summary, we feel that now discarded installer (bootstrap / cache / providers.php is written by the Composer plug-in installed), and then add a code matching from the vendor directory, write to bootstrap / cache / package. php to go, only to prepare for the 5.5. come on! ! !

Open source code repository

GitHub: https://github.com/zhiyicx/thinksns-plus (Click star, concerned about the development of dynamic daily .)

Past research diary Portal:

"ThinkSNS + Laravel master branch based on a diary [research and development]."

"ThinkSNS + R & D in front of the choice (webpack / Vue) stepped pit development diary diary [two]."

"ThinkSNS + Component-based development Laravel Route diary of [three]."

"How do Laravel configuration can be configured website background research diary [four]."

"ThinkSNS + show how to calculate the length of character development diary [five]" Please add a link description

"Based on the ThinkSNS + alpha.2 Laravel release [research and development] Diary of six"

Guess you like

Origin blog.51cto.com/14231620/2412833
5.5