Developer Lost; where do I point Apache to?


(BillHeaton) #1

I’m following Git workflow for Yii 2 contributors and have what appears to be a proper distribution locally. Wanted to test that it’s working before I start loading the Extension that I want to work on.

My perplexing problem is figuring out where in the git tree should I be pointing apache?

Thanks In Advance.


(Alexander Makarov) #2

apps/basic/web/. Check ./build/build dev/app command.


(BillHeaton) #3

Thank-you @samdark. I have apps/basic/ but no web. I’ll redo the build/build dev/app.


(BillHeaton) #4

Did the build/build still no web directory. I’ll erase and start all over tonight.


(BillHeaton) #5

@samdark Restarted from scratch. Still no app/basic/web directory…

url is slightly different 'cause I’m on a mac and have to use ~/.ssh/config to get the key to github.

php build/build dev/app basic github:BillHeaton/yii2.git

cloning application repo ‘basic’ from ‘github:BillHeaton/yii2.git’…
Cloning into ‘/Volumes/Work/Projects/yii2/apps/basic’…
remote: Enumerating objects: 36, done.
remote: Counting objects: 100% (36/36), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 147075 (delta 14), reused 17 (delta 5), pack-reused 147039
Receiving objects: 100% (147075/147075), 71.86 MiB | 1.41 MiB/s, done.
Resolving deltas: 100% (102041/102041), done.
done.
cleaning up application ‘basic’ vendor directory…
done.
updating composer for app ‘basic’…
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 49 installs, 0 updates, 0 removals

  • Installing yiisoft/yii2-composer (2.0.8): Loading from cache
  • Installing sebastian/version (1.0.6): Loading from cache
  • Installing sebastian/global-state (1.1.1): Loading from cache
  • Installing sebastian/recursion-context (1.0.5): Loading from cache
  • Installing sebastian/exporter (1.2.2): Loading from cache
  • Installing sebastian/environment (1.3.8): Loading from cache
  • Installing sebastian/diff (1.4.3): Loading from cache
  • Installing sebastian/comparator (1.2.4): Loading from cache
  • Installing symfony/polyfill-ctype (v1.12.0): Loading from cache
  • Installing symfony/yaml (v2.8.50): Loading from cache
  • Installing doctrine/instantiator (1.0.5): Loading from cache
  • Installing phpdocumentor/reflection-docblock (2.0.5): Loading from cache
  • Installing phpspec/prophecy (1.8.1): Loading from cache
  • Installing phpunit/php-text-template (1.2.1): Loading from cache
  • Installing phpunit/phpunit-mock-objects (2.3.8): Loading from cache
  • Installing phpunit/php-timer (1.0.9): Loading from cache
  • Installing phpunit/php-token-stream (1.4.12): Loading from cache
  • Installing phpunit/php-file-iterator (1.4.5): Loading from cache
  • Installing phpunit/php-code-coverage (2.2.4): Loading from cache
  • Installing phpunit/phpunit (4.8.34): Loading from cache
  • Installing cebe/indent (1.0.2): Loading from cache
  • Installing ezyang/htmlpurifier (v4.11.0): Loading from cache
  • Installing cebe/markdown (1.2.1): Loading from cache
  • Installing bower-asset/jquery (3.4.1): Loading from cache
  • Installing bower-asset/inputmask (3.3.11): Loading from cache
  • Installing bower-asset/punycode (v1.3.2): Loading from cache
  • Installing bower-asset/yii2-pjax (2.0.7.1): Loading from cache
  • Installing symfony/stopwatch (v2.8.50): Loading from cache
  • Installing symfony/process (v2.8.50): Loading from cache
  • Installing symfony/polyfill-php72 (v1.12.0): Loading from cache
  • Installing paragonie/random_compat (v2.0.18): Loading from cache
  • Installing symfony/polyfill-php70 (v1.12.0): Loading from cache
  • Installing ircmaxell/password-compat (v1.0.4): Loading from cache
  • Installing symfony/polyfill-php55 (v1.12.0): Loading from cache
  • Installing symfony/polyfill-php54 (v1.12.0): Loading from cache
  • Installing symfony/options-resolver (v2.8.50): Loading from cache
  • Installing symfony/finder (v2.8.50): Loading from cache
  • Installing symfony/filesystem (v2.8.50): Loading from cache
  • Installing symfony/event-dispatcher (v2.8.50): Loading from cache
  • Installing symfony/polyfill-mbstring (v1.12.0): Loading from cache
  • Installing psr/log (1.1.0): Loading from cache
  • Installing symfony/debug (v2.8.50): Loading from cache
  • Installing symfony/console (v2.8.50): Loading from cache
  • Installing doctrine/lexer (1.0.2): Loading from cache
  • Installing doctrine/annotations (v1.2.7): Loading from cache
  • Installing composer/xdebug-handler (1.3.3): Loading from cache
  • Installing composer/semver (1.5.0): Loading from cache
  • Installing friendsofphp/php-cs-fixer (v2.2.20): Loading from cache
  • Installing johnkary/phpunit-speedtrap (v1.0.1): Loading from cache
    sebastian/global-state suggests installing ext-uopz (*)
    phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
    phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
    phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
    paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
    symfony/event-dispatcher suggests installing symfony/dependency-injection
    symfony/event-dispatcher suggests installing symfony/http-kernel
    symfony/console suggests installing psr/log-implementation (For using the console logger)
    friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-isidenticalstring (For IsIdenticalString constraint.)
    friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-xmlmatchesxsd (For XmlMatchesXsd constraint.)
    Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
    Writing lock file
    Generating autoload files
    done.
    linking framework and extensions to ‘basic’ app vendor dir…
    done.

(Alexander Makarov) #6

Weird. What do you have in app/basic?


(BillHeaton) #7

/volumes/work/projects/yii2/apps/basic

-rw-r–r-- 1 wjh staff 224 Sep 9 16:25 Dockerfile
-rw-r–r-- 1 wjh staff 1524 Sep 9 16:25 LICENSE.md
-rw-r–r-- 1 wjh staff 4779 Sep 9 16:25 README.md
-rw-r–r-- 1 wjh staff 941 Sep 9 16:25 ROADMAP.md
drwxr-xr-x 7 wjh staff 238 Sep 9 16:25 build
-rw-r–r-- 1 wjh staff 2902 Sep 9 16:25 code-of-conduct.md
-rw-r–r-- 1 wjh staff 3518 Sep 9 16:25 composer.json
-rw-r–r-- 1 wjh staff 89291 Sep 9 16:26 composer.lock
drwxr-xr-x 3 wjh staff 102 Sep 9 16:25 contrib
drwxr-xr-x 4 wjh staff 136 Sep 9 16:25 cs
drwxr-xr-x 29 wjh staff 986 Sep 9 16:25 docs
drwxr-xr-x 39 wjh staff 1326 Sep 9 16:25 framework
-rw-r–r-- 1 wjh staff 797 Sep 9 16:25 package.json
-rw-r–r-- 1 wjh staff 1390 Sep 9 16:25 phpunit.xml.dist
drwxr-xr-x 23 wjh staff 782 Sep 9 16:25 tests
drwxr-xr-x 20 wjh staff 680 Sep 9 16:32 vendor


(Alexander Makarov) #8

Aha!

Should have been php build/build dev/app basic github:BillHeaton/yii2-app-basic.git so clone https://github.com/yiisoft/yii2-app-basic to your profile first.


(BillHeaton) #9

@samdark Thank-you!

Yes! I now have a app/basic/web with the expected files in it. It makes sense in a perverted way. It would appear that the instructions need to be updated slightly.

If you are going to work with PHP:

  • Fork the Yii-app-basic repository on GitHub.
  • Run php build/build dev/app basic <fork> to clone the basic app and install composer dependencies for the basic app. <fork> is URL of your repository fork such as git@github.com:my_nickname/yii2-app-basic.git . If you are core framework contributor you may skip specifying fork. This command will install foreign composer packages as normal but will link the yii2 repo to the currently checked out repo, so you have one instance of all the code installed.
  • cd yii2/apps/basic/web
  • php composer.phar require --prefer-dist yiisoft/yii2-bootstrap4
  • edit yii2/apps/basic/web/config/web.php and set cookieValidationKey

(Alexander Makarov) #10

It is described in https://github.com/yiisoft/yii2/blob/master/docs/internals/git-workflow.md#prepare-your-development-environment including fork for the basic template.


(BillHeaton) #11

Lost Changes? It says:

  • run php build/build dev/app basic <fork> to clone the basic app and install composer dependencies for the basic app. <fork> is URL of your repository fork such as git@github.com:my_nickname/yii2-app-basic.git . If you are core framework contributor you may skip specifying fork. This command will install foreign composer packages as normal but will link the yii2 repo to the currently checked out repo, so you have one instance of all the code installed.Do the same for the advanced app if needed: php build/build dev/app advanced <fork> .This command will also be used to update dependencies, it runs composer update internally.

(BillHeaton) #12

However, it is up and working. Now to get the extension in place. Thank-you again for your help.