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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
composer.lock
vendor
**.swp
docs/contract.html
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,5 @@ to set the cache directory.
V2.0.0 End support for PHP <5.6

V2.1.0 Remove hard dependency on Captcha library

V2.1.1 Standardise code structure
21 changes: 0 additions & 21 deletions autoload.php

This file was deleted.

5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@
"suggest": {
"gregwar/captcha": "To implement Captcha capability into forms"
},
"target-dir": "Gregwar/Formidable",
"autoload": {
"psr-0": {
"Gregwar\\Formidable": ""
"psr-4": {
"Gregwar\\Formidable\\": "src"
}
}
}
Empty file added docs/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion examples/basic.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('<form method="post">
What\'s your name? <input type="text" name="nom" /><br />
Expand Down
2 changes: 1 addition & 1 deletion examples/cache-file.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$_SESSION = array();

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('forms/performances.html', null, true);

Expand Down
2 changes: 1 addition & 1 deletion examples/cache.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$_SESSION = array();

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('<form method="post">
What\'s your name? <input type="text" name="nom" /><br />
Expand Down
2 changes: 1 addition & 1 deletion examples/custom.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('<form method="post">
<custom source="something" />
Expand Down
4 changes: 2 additions & 2 deletions examples/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
session_start(); // required for CSRF
include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');
include('person.php');

$form = new Gregwar\Formidable\Form('forms/demoform.html', array());
Expand Down Expand Up @@ -35,7 +35,7 @@
<h1>Formidable Demo</h1>
<?php if ($errors) { ?>
<div style="color:red">
<h2>Validations error</h1>
<h1>Validations error</h1>
<ul>
<?php foreach ($errors as $error) { ?>
<li><?php echo $error; ?></li>
Expand Down
2 changes: 1 addition & 1 deletion examples/mapping.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

class Person
{
Expand Down
2 changes: 1 addition & 1 deletion examples/minmax.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('<form method="post">
How old are you? <input type="int" name="age" min="18" max="130" />
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Film
public $actors;
}

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('<form method="post">

Expand Down
2 changes: 1 addition & 1 deletion examples/performances.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$iterations = 5000;

Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('<form method="post">
<span style="color:{{ color }}">Hello</span>
Expand Down
2 changes: 1 addition & 1 deletion examples/select.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('<form method="post">
<select name="colour">
Expand Down
2 changes: 1 addition & 1 deletion examples/source.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

include(__DIR__.'/../autoload.php');
include(__DIR__ . '/../vendor/autoload.php');

$form = new Gregwar\Formidable\Form('<form method="post">
<select name="animal">
Expand Down
17 changes: 11 additions & 6 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
bootstrap="./vendor/autoload.php"
>
<testsuites>
<testsuite name="Formidable Test Suite">
<file>./tests/ParserTests.php</file>
<file>./tests/FormTests.php</file>
<file>./tests/ContextTests.php</file>
<file>./tests/ConstraintsTests.php</file>
<testsuite name="Default">
<directory suffix="Test.php">./test</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<logging>
<log type="testdox-html" target="./docs/contract.html"/>
</logging>

</phpunit>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading