Skip to content
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

[ticket/11291] phing: Run Composer Correctly #1162

Merged
merged 11 commits into from Dec 29, 2012

Conversation

@bantu
Copy link
Member

commented Dec 23, 2012

[ticket/11291] phing: Make sure composer is available before calling it.
Older versions of the tree didn't use it.

PHPBB3-11291
@bantu

This comment has been minimized.

Copy link
Member Author

commented Dec 23, 2012

Actually, there might be a bug here.

@bantu

This comment has been minimized.

Copy link
Member Author

commented Dec 23, 2012

composer.phar is never there because git archive only extracts the phpBB directory.

@p

This comment has been minimized.

Copy link
Contributor

commented Dec 24, 2012

So should this be tested/merged or not?

@bantu

This comment has been minimized.

Copy link
Member Author

commented Dec 24, 2012

This patch gets rid of the error message, but composer.phar is still never executed. We might want to just merge this and fix the other issue in a new ticket. I'm open to alternative suggestions.

@p

This comment has been minimized.

Copy link
Contributor

commented Dec 24, 2012

olympus should not have composer at all? This patch might make sense for develop.

bantu added 8 commits Dec 29, 2012
[ticket/11291] phing: Correct dependencies of composer target.
This command runs composer in the phpBB tree and does not write to the build
folders. Thus, it does not have to depend on prepare and clean targets.

PHPBB3-11291
[ticket/11291] phing: Add --dev to composer install.
The composer target runs composer in the phpBB tree in order to load
dependencies for testing. The testing framework may have additional
development dependencies (e.g. goutte). We also have to load those.

PHPBB3-11291
[ticket/11291] phing: Adjust directory format of composer exec.
Adjust the directory format to what all the other exec calls are using.

PHPBB3-11291
[ticket/11291] phing: The package target does not depend on composer.
The packaging process does not require running composer in the phpBB tree.
It does however require running composer on the git exports, but this is not
what the composer target does.

PHPBB3-11291
[ticket/11291] phing: Exclude vendor folder from diffs.
Otherwise we end up with very huge diffs and the build process is severely
slowed down.

PHPBB3-11291
@p

This comment has been minimized.

Copy link
Contributor

commented Dec 29, 2012

You need checkreturn='true' to stop the build if a command (e.g. composer exec) fails.

vps47958% phing       
Buildfile: /home/php/phpbb3/build/build.xml
phpBB > clean:
   [delete] Deleting directory /home/php/phpbb3/build/logs
   [delete] Deleting directory /home/php/phpbb3/build/api
   [delete] Deleting directory /home/php/phpbb3/build/codebrowser
   [delete] Deleting directory /home/php/phpbb3/build/coverage
   [delete] Deleting directory /home/php/phpbb3/build/cpd
   [delete] Deleting directory /home/php/phpbb3/build/dependencies
   [delete] Deleting directory /home/php/phpbb3/build/new_version
   [delete] Deleting directory /home/php/phpbb3/build/old_versions
   [delete] Deleting directory /home/php/phpbb3/build/save
phpBB > prepare:
    [mkdir] Created dir: /home/php/phpbb3/build/logs
    [mkdir] Created dir: /home/php/phpbb3/build/api
    [mkdir] Created dir: /home/php/phpbb3/build/codebrowser
    [mkdir] Created dir: /home/php/phpbb3/build/coverage
    [mkdir] Created dir: /home/php/phpbb3/build/cpd
    [mkdir] Created dir: /home/php/phpbb3/build/dependencies
    [mkdir] Created dir: /home/php/phpbb3/build/new_version
    [mkdir] Created dir: /home/php/phpbb3/build/new_version/files
    [mkdir] Created dir: /home/php/phpbb3/build/new_version/patches
    [mkdir] Created dir: /home/php/phpbb3/build/new_version/release_files
    [mkdir] Created dir: /home/php/phpbb3/build/new_version/update
    [mkdir] Created dir: /home/php/phpbb3/build/old_versions
    [mkdir] Created dir: /home/php/phpbb3/build/save
phpBB > composer:
phpBB > test:
sh: phpunit: command not found
phpBB > docs:
sh: phpdoctor: command not found
phpBB > prepare-new-version:
    [mkdir] Created dir: /home/php/phpbb3/build/new_version/phpBB3
[phingcall] Calling Buildfile '/home/php/phpbb3/build/build.xml' with target 'export'
phpBB > export:
Could not open input file: ../composer.phar
Execution of target "export" failed for the following reason: /home/php/phpbb3/build/build.xml:167:22: Task exited with code 1
[phingcall] /home/php/phpbb3/build/build.xml:167:22: Task exited with code 1
Execution of target "prepare-new-version" failed for the following reason: /home/php/phpbb3/build/build.xml:108:20: Execution of the target buildfile failed. Aborting.
BUILD FAILED
/home/php/phpbb3/build/build.xml:108:20: Execution of the target buildfile failed. Aborting.
Total time: 2.1739 seconds
@p

This comment has been minimized.

Copy link
Contributor

commented Dec 29, 2012

Above output was pre-patch with checkreturn added for composer target. Note that docs and tests tasks fail but are considered to succeed.

-->
<target name="composer">
<exec dir="phpBB"
command="php ../composer.phar install --dev"

This comment has been minimized.

Copy link
@p

p Dec 29, 2012

Contributor

checkreturn here?

p added a commit to p/phpbb3 that referenced this pull request Dec 29, 2012
Merge PR phpbb#1162 branch 'bantu/ticket/11291' into develop-olympus
# By Andreas Fischer
# Via Andreas Fischer
* bantu/ticket/11291:
  [ticket/11291] phing: Also add checkreturn="true" to composer execution.
  [ticket/11291] phing: Add checkreturn="true" to all new commands.
  [ticket/11291] phing: Exclude vendor folder from diffs.
  [ticket/11291] phing packaging: Export composer.phar and install dependencies.
  [ticket/11291] phing: Remove no longer needed create-package target.
  [ticket/11291] phing: The package target does not depend on composer.
  [ticket/11291] phing: Adjust directory format of composer exec.
  [ticket/11291] phing: Add description for composer target.
  [ticket/11291] phing: Add --dev to composer install.
  [ticket/11291] phing: Correct dependencies of composer target.
  [ticket/11291] phing: Make sure composer is available before calling it.
p added a commit to p/phpbb3 that referenced this pull request Dec 29, 2012
Merge PR phpbb#1162 branch 'develop-olympus' into develop
# By Andreas Fischer
# Via Andreas Fischer (1) and Oleg Pudeyev (1)
* develop-olympus:
  [ticket/11291] phing: Also add checkreturn="true" to composer execution.
  [ticket/11291] phing: Add checkreturn="true" to all new commands.
  [ticket/11291] phing: Exclude vendor folder from diffs.
  [ticket/11291] phing packaging: Export composer.phar and install dependencies.
  [ticket/11291] phing: Remove no longer needed create-package target.
  [ticket/11291] phing: The package target does not depend on composer.
  [ticket/11291] phing: Adjust directory format of composer exec.
  [ticket/11291] phing: Add description for composer target.
  [ticket/11291] phing: Add --dev to composer install.
  [ticket/11291] phing: Correct dependencies of composer target.
  [ticket/11291] phing: Make sure composer is available before calling it.

@p p merged commit 6951356 into phpbb:develop-olympus Dec 29, 2012

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.