Difference between #1 and #2 of
Yii2: How to create/develop a new extension using Composer locally without version control or Git

Changes

Title unchanged

Yii2: How to create/develop a new extension using Composer locally without version control or Git

Category unchanged

How-tos

Yii version changed

2.0

Tags changed

yii2, extensions, tutorial,git, composer, tutorial, yii2,editing

Content changed

[...]
~~~

You probably don't have a "repositories" section, so add it. Notice we use "path" for the type, this does not require any version control :) For the url, I use the full path to the extension I am currently working on. This will actually create a symbolic link to the directory, which is key for live editing! I added my extension to the "require-dev" section, because it is development. Just in case this was pushed to the server, I don't want to break anything. When it's all done and on Packagist, I would put it where it belongs and remove the entry in "repositories" so it loads from Packagist and not my local computer.

Now we are ready to run:

 
~~~
composer update
~~~

If everything is correct, you should see Composer load your library when watching your terminal output. Open your Yii2 app in your editor and view the "vendor" directory, look for your namespace dir (wadeshuler for me), then under it you should see a directory for your extension. Now, it is empty. If it loaded fine, you are ready to start building your extension. All changes are live in your main Yii app so you can test while coding! No committing, no updating. Just edit, save, refresh!!!
[...]
7 0
6 followers
Viewed: 37 766 times
Version: 2.0
Category: How-tos
Written by: Wade Shuler
Last updated by: jwerner
Created on: Aug 12, 2016
Last updated: 5 years ago
Update Article

Revisions

View all history