Skip to content

Commit 6331c8b

Browse files
committed
Update instructions, add .gitignore entry, and lock dependencies
Enhances documentation with guidelines for development and testing, emphasizing proper handling of relative paths during execution. Adds `/src/php_errors.log` to .gitignore to exclude error logs from version control. Introduces `composer.lock` to lock dependencies, ensuring consistent builds and dependency management across environments.
1 parent 7a68a41 commit 6331c8b

5 files changed

Lines changed: 66 additions & 2 deletions

File tree

.github/copilot-instructions.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,19 @@ When writing code, always ensure that it is well-tested and includes unit tests
4242
When writing code, always ensure that it is maintainable and follows best practices.
4343

4444
When create new class or update existing class, always create or update its phpunit test files.
45+
46+
When developing or testing this application, always run the main script from the src/ or libexec/ directory:
47+
```bash
48+
cd libexec/
49+
php csas-access-token.php
50+
```
51+
52+
```bash
53+
cd src/
54+
php index.php
55+
```
56+
57+
This ensures the relative paths (../vendor/autoload.php and ../.env) work correctly during development.
58+
59+
The application uses relative paths intentionally - they are resolved during Debian packaging via sed commands in debian/rules file for production deployment.
60+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222
/debian/csas-authorize-mysql.postrm.debhelper
2323
/debian/csas-authorize-sqlite.postrm.debhelper
2424
.phpunit.cache/test-results
25+
/src/php_errors.log

composer.lock

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

debian/rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ override_dh_install:
1818
touch debian/csas-authorize-sqlite/var/lib/dbconfig-common/sqlite3/csas-authorize/csas-authorize
1919
sed -i -e 's/..\/vendor/\/var\/lib\/composer\/csas-authorize/g' debian/csas-authorize/usr/*/csas-authorize/*.php
2020
sed -i -e 's/\.\.\/\.env/\/etc\/csas-authorize\/csas-authorize\.env/g' debian/csas-authorize/usr/*/csas-authorize/*.php
21+
sed -i -e 's/\.\.\/src\/init\.php/\/usr\/share\/csas-authorize\/init\.php/g' debian/csas-authorize/usr/*/csas-authorize/*.php
2122
sed -i -e 's/..\/i18n/\/usr\/share\/locale/g' debian/csas-authorize/usr/share/csas-authorize/init.php
2223

2324
override_dh_clean:

debian/tmp/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"deb/ease-html-widgets": "*",
99
"deb/ease-bootstrap5": "*",
1010
"league/oauth2-client": "dev-master",
11-
"deb/csas-accountsapi": "*"
11+
"deb/csas-accountsapi": "*",
12+
"kint-php/kint": "^5.0"
1213
},
1314
"license": "MIT",
1415
"authors": [
@@ -57,5 +58,5 @@
5758
"url": "/usr/share/php/CSasAccounts/"
5859
}
5960
],
60-
"version": "0.3.0"
61+
"version": "0.2.1"
6162
}

0 commit comments

Comments
 (0)