Skip to content

Commit

Permalink
install php-asana fork to update composer dependencies, resolves #217
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleBlanchette committed May 4, 2024
1 parent 1484e5c commit 97207ae
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 152 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:

- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build - Install
run: ./build_install.sh
Expand Down Expand Up @@ -56,4 +58,3 @@ jobs:
ssh-keyscan ${{ secrets.PTC_PROD_HOSTNAME }} >> ~/.ssh/known_hosts
scp -i ./deploy_key ${{ env.PTC_PLUGIN_ZIP_FILE }} ${{ env.remote }}:${{ env.destination }}
ssh -i ./deploy_key ${{ env.remote }} 'chmod 775 ${{ env.destination }}; chgrp www-data ${{ env.destination }}' || true
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "php-asana"]
path = php-asana
url = https://github.com/PurpleTurtleCreative/php-asana.git
9 changes: 9 additions & 0 deletions build_install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash

# Currently, only dev dependencies are included,
# so installation is unnecessary.
# composer install --optimize-autoloader --no-dev

# Install our own fork of Asana's PHP SDK because
# they haven't pushed updates in a very long time
# and we include our own repairs for PHP 8 compatibility.
pushd php-asana
composer install --optimize-autoloader --no-dev
popd

npm ci --no-audit
npm run build
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"require": {
"asana/asana": "1.0.6"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"phpcompatibility/phpcompatibility-wp": "^2.1",
Expand Down
150 changes: 3 additions & 147 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions php-asana
Submodule php-asana added at 369e2f
2 changes: 1 addition & 1 deletion src/includes/class-autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Autoloader {
*/
public static function register() {
// Autoload third-party dependencies.
require_once PLUGIN_PATH . '/vendor/autoload.php';
require_once PLUGIN_PATH . '/php-asana/vendor/autoload.php';
// Autoload our own class files.
spl_autoload_register( __CLASS__ . '::load_class_file' );
}
Expand Down

0 comments on commit 97207ae

Please sign in to comment.