GithubHelp home page GithubHelp logo

phpbb / phpbb-ext-acme-demo Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 27.0 92 KB

ACME Demo Extension for phpBB: http://en.wikipedia.org/wiki/Acme_Corporation

License: GNU General Public License v2.0

PHP 87.93% Shell 4.03% HTML 8.04%

phpbb-ext-acme-demo's Introduction

phpBB

phpBB is a free open-source bulletin board written in PHP.

๐Ÿง‘๐Ÿปโ€๐Ÿค๐Ÿป๐Ÿง‘๐Ÿฝ Community

Get your copy of phpBB, find support and lots more on phpBB.com. Discuss the development on area51.

๐Ÿ‘จโ€๐Ÿ’ป Contribute

  1. Create an account on phpBB.com
  2. Create a ticket (unless there already is one)
  3. Read our Coding guidelines and Git Contribution Guidelines
  4. Send us a pull request

๐Ÿ—๏ธ Setting up a development build of phpBB

To run an installation from the repo (and not from a pre-built package) on a local server, run the following commands:

  • Fork phpbb/phpbb to your GitHub account, then create a local clone of it:
    git clone https://github.com/your_github_name/phpbb.git
    
  • Install phpBB's dependencies (from the root of your phpbb repo):
    cd phpBB
    php ../composer.phar install
    

Alternatively, you can read:

๐Ÿ““ Documentation

phpBB's Development Documentation contains all the information you'll need to learn about developing for phpBB's core, extensions and automated testing.

๐Ÿ”ฌ Automated Testing

We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration here or check our GitHub Actions below:

Branch Description GitHub Actions
master Latest development version Tests
3.3.x Development of version 3.3.x Tests

๐Ÿ“œ License

GNU General Public License v2

phpbb-ext-acme-demo's People

Contributors

imattpro avatar marc1706 avatar michaelcullum avatar nickvergessen avatar nicofuma avatar paul999 avatar robertheim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpbb-ext-acme-demo's Issues

JSON_PRETTY_PRINT Option in db_test_case

In database test case:

If (version_compare(PHP_VERSION, '5.4.0', '>='))
{
    fwrite($fp, json_encode($schema_data, JSON_PRETTY_PRINT));
}
else
{
    fwrite($fp, json_encode($schema_data));
}

Although, if the visual appearance of the json schema file is unimportant, since its just created for testing, then perhaps the JSON_PRETTY_PRINT option isn't necessary at all here.

phpunit errors

hi,

i ran the phpunit tests, could you have a look at these results please ?

zeus:phpbb31 Nix$ phpBB/vendor/bin/phpunit -c phpBB/ext/acme/demo/phpunit.xml.dist
PHPUnit 4.1.0 by Sebastian Bergmann.

Configuration read from /Users/Nix/Sites/phpbb31/phpBB/ext/acme/demo/phpunit.xml.dist

.
Warning: copy(/Users/Nix/Sites/phpbb31/tests/test_framework/../../phpBB/install/schemas/schema.json): failed to open stream: No such file or directory in /Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_database_test_case.php on line 85

Warning: copy(/Users/Nix/Sites/phpbb31/tests/test_framework/../../phpBB/install/schemas/schema.json): failed to open stream: No such file or directory in /Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_database_test_case.php on line 86
E
Warning: copy(/Users/Nix/Sites/phpbb31/tests/test_framework/../tmp/schema_phpbb_copy.json): failed to open stream: No such file or directory in /Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_database_test_case.php on line 96
EE

Time: 98 ms, Memory: 9.00Mb

There were 3 errors:

1) acme\demo\tests\dbal\simple_test::test_column
RuntimeException: You have specified an invalid dbms driver: 

/Users/Nix/Sites/phpbb31/phpBB/phpbb/config_php_file.php:173
/Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_test_case_helpers.php:153
/Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_database_test_case.php:164
/Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_database_test_case.php:176
/Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_database_test_case.php:119

2) acme\demo\tests\functional\demo_test
RuntimeException: You have specified an invalid dbms driver: 

/Users/Nix/Sites/phpbb31/phpBB/phpbb/config_php_file.php:173
/Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_test_case_helpers.php:153
/Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_functional_test_case.php:43

3) acme\demo\tests\functional\demo_test
RuntimeException: You have specified an invalid dbms driver: 

/Users/Nix/Sites/phpbb31/phpBB/phpbb/config_php_file.php:173
/Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_test_case_helpers.php:153
/Users/Nix/Sites/phpbb31/tests/test_framework/phpbb_functional_test_case.php:43

FAILURES!                          
Tests: 2, Assertions: 3, Errors: 3.
zeus:phpbb31 Nix$ 

Some name changes

Can you change the test suite names in the travis xml files (so it's less for us to change when moving to our extensions)?

<testsuite name="Acme Demo Test Suite">
<testsuite name="Acme Demo Functional Tests">

Replace Acme Demo with Extension
It's more generic that way :)

Support adding extension lang files in functional tests

Add to functional_test_case.php

protected function add_lang_ext($lang_file)
{
    if (is_array($lang_file))
    {
        foreach ($lang_file as $file)
        {
            $this->add_lang_ext($file);
        }

        return;
    }

    $lang_path = __DIR__ . "/../../language/en/$lang_file.php";

    $lang = array();

    if (file_exists($lang_path))
    {
        include($lang_path);
    }

    $this->lang = array_merge($this->lang, $lang);
}

Composer Failures

I managed to find a way around the fails of the composer install.

It appears to be related to caching and APC.

I disabled the APC before composer installs, then re-enabled it after, in travis.yml, like so

  - echo "apc.enable_cli=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - php ../composer.phar install --dev --no-interaction --prefer-source
  - echo "apc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

See it worked (well, except for hhvm):
https://travis-ci.org/VSEphpbb/boardrules/builds/23698741

Maybe you can come up with a better solution, but this shows we're on track

UCP / MCP Modules

Can you add quick and simple UCP and MCP modules too, just as examples? I could do it in a PR if you want, but I think there should be examples of this as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.