Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# EditorConfig is awesome: https://EditorConfig.org

# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.github/ export-ignore
docs/ export-ignore
Tests/ export-ignore
.editorconfig export-ignore
.git-blame-ignore-revs export-ignore
.gitattributes export-ignore
.gitignore export-ignore
phpstan.neon export-ignore
phpunit.xml.dist export-ignore
ruleset.xml export-ignore
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI Joomla Framework

on:
push:
pull_request:
schedule:
- cron: 15 2 * * 1

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
framework-ci:
uses: joomla-framework/.github/.github/workflows/workflow-v4.yml@main
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# IDE Related Files #
.buildpath
.project
.settings
.DS_Store
.idea

# Composer and test related files #
vendor/
composer.phar
composer.lock
phpunit.xml
phpunit.*.xml
.phpunit.cache/
.idea/
/.phpunit.result.cache
/.phpunit.cache/
20 changes: 20 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Security Policy

## Supported Versions

These versions are currently being supported with security updates:

| Version | Supported |
|---------| ------------------ |
| 4.x.x | :white_check_mark: |

## Reporting a Vulnerability

To report a security issue in the core Joomla! CMS or Framework, or with a joomla.org website, please submit
[the form on our portal](https://developer.joomla.org/security/contact-the-team.html) containing as much detail
as possible about the issue. Additional information about our security team and their processes may be found on
our [Security page](https://developer.joomla.org/security.html).

To report an issue in a Joomla! extension, please submit it to the [Vulnerable Extensions List](https://vel.joomla.org/submit-vel).

For support with a site which has been attacked, please visit the [Joomla! Forum](https://forum.joomla.org/viewforum.php?f=714).
21 changes: 9 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
"name": "joomla-framework/ai",
"name": "joomla/ai",
"type": "joomla-package",
"description": "Joomla AI Package",
"keywords": ["joomla", "framework", "ai"],
"homepage": "https://github.com/joomla-projects/gsoc25_ai_framework",
"license": "GPL-2.0-or-later",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/joomla-framework/http.git"
}
],
"require": {
"php": "^8.1.0",
"joomla/http": "dev-4.x-dev",
"joomla/filesystem": "~3.0"
"php": "^8.3.0",
"joomla/http": "^4.0",
"joomla/filesystem": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5.28"
"phpunit/phpunit": "^12.0",
"squizlabs/php_codesniffer": "^3.10.2",
"phpstan/phpstan": "^2.1.17",
"phpstan/phpstan-deprecation-rules": "^2.0.3"
},
"autoload": {
"psr-4": {
Expand All @@ -29,4 +26,4 @@
"Joomla\\AI\\Tests\\": "Tests/"
}
}
}
}
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [Overview](overview.md)
3 changes: 3 additions & 0 deletions docs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Overview

The AI package provides an abstraction layer to access the services of several AI providers.
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

includes:
- vendor/phpstan/phpstan-deprecation-rules/rules.neon

parameters:
level: 5
phpVersion: 80300
reportUnmatchedIgnoredErrors: false
paths:
- src
29 changes: 29 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="Tests/bootstrap.php" colors="false">
<php>
<env name="JOOMLA_TEST_DB_DRIVER" value="mysqli" />
<env name="JOOMLA_TEST_DB_HOST" value="mysqli" />
<env name="JOOMLA_TEST_DB_PORT" value="3306" />
<env name="JOOMLA_TEST_DB_USER" value="root" />
<env name="JOOMLA_TEST_DB_PASSWORD" value="" />
<env name="JOOMLA_TEST_DB_DATABASE" value="joomla_ut" />
<env name="JOOMLA_TEST_DB_PREFIX" value="" />

<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>
<testsuites>
<testsuite name="Unit">
<directory>Tests/Command</directory>
<directory>Tests/Monitor</directory>
<directory>Tests/Query</directory>
<directory>Tests/Service</directory>
<file>Tests/AbstractDatabaseDriverTestCase.php</file>
<file>Tests/DatabaseAwareTraitTest.php</file>
<file>Tests/DatabaseExporterTest.php</file>
<file>Tests/DatabaseFactoryTest.php</file>
<file>Tests/DatabaseImporterTest.php</file>
<file>Tests/DatabaseIteratorTest.php</file>
<file>Tests/DatabaseQueryTest.php</file>
</testsuite>
</testsuites>
</phpunit>
21 changes: 21 additions & 0 deletions ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<ruleset name="PSR12 with Joomla specific additions">
<description>
This is a PSR-12 compliant ruleset for Joomla.
</description>

<file>src</file>
<file>Tests</file>

<arg name="extensions" value="php"/>
<arg name="report" value="full"/>
<arg name="tab-width" value="4"/>
<arg name="encoding" value="utf-8"/>
<arg name="colors" />
<arg value="sp"/>

<rule ref="PSR12">
<exclude name="Generic.Files.LineLength.MaxExceeded"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
</rule>
</ruleset>