Fail: /Library/WebServer/Documents/wact/tests/cases/db/drivers/mysql.test.php -> MySQLStatementTestCase -> testSetDecimal -> Equal expectation fails at character 15 with [1234567890123457024.00] and [1234567890123456789.01] at line [319]
Fail: /Library/WebServer/Documents/wact/tests/cases/db/drivers/mysql.test.php -> MySQLStatementTestCase -> testSetDecimal -> Equal expectation fails at character 15 with [1234567890123457024.00] and [1234567890123456789.01] at line [322]
Fail: /Library/WebServer/Documents/wact/tests/cases/db/drivers/mysql.test.php -> MySQLStatementTestCase -> testSetDecimal -> Equal expectation fails at character 15 with [1234567890123457024.00] and [1234567890123456789.01] at line [323]
==== Add Meta data capability ====
Needed to support tools.
===== Event package =====
===== Exception package =====
===== i18n package =====
The current version of WACT will support unicode in the form of the UTF-8 character set. There are no plans to support character sets incompatible with UTF-8, or multi-lingual applications until the release of PHP 6.
===== Log package =====
What should this package look like?
===== Template package =====
==== Composable Templates ====
=== Convert FileScheme from function calls to object instance calls ===
The current design for FileScheme sucks. The runtime and compile time halves of this construct should be combined into a single object. An instance of that object should be used, not static calls.
=== Create a TemplateFactory ===
Instantiating a templates directly currently represents an obstacle for supporting the composition of templates. Additionally, the FileScheme mechanism is poorly designed and poorly understood. The solution is to make the filescheme into a TemplateFactory object and use the TemplateFactory to instantiate Template objects. The following code:
$tmpl =& new Template('example.html');
Would become:
$tmpl =& $templateFactory->newTemplate('example.html');
Note that any code that instantiates a template is responsible for requiring an appropriate factory. The Template Factory instance performs the current duties of the filescheme, mapping compiled template files to source template files.
This paves the way for supporting the composition of templates and views and also for the use of the dependency injection pattern.
=== Add class support to CodeWriter ===
Add the ability for the CodeWriter to create classes, properties and methods.
Need the ability to switch between scopes: global, function, class, and method so that the entire file need not be generated linearly.
==== Convert Template Structure from procedural to object oriented ====
Currently, generated template code conforms to the following structure.
codefile] = 'tpl8dee52a87b31cfcdbc54dbd2090f910e1';
$GLOBALS['TemplateConstruct'][$this->codefile] = 'tpl8dee52a87b31cfcdbc54dbd2090f910e2'; ?>
To better enable template composition, This structure should be encapsulated into an object:
class tpl8dee52a87b31cfcdbc54dbd2090f910e1 extends Template {
function construct(&$root) {
}
function render(&$root) {
}
}
Before making this change, all template instantiation must be done through a factory, rather than using a constructor. (because the actually class instantiated will now be something like tpl8dee52a87b31cfcdbc54dbd2090f910e1.)
Some sort of mapping between template names and class names with probably be adopted. for example 'test/index.html' might become class test_index_template {}.
=== Change compiled component and datasource to relative instead of root based access ===
Currently components are accessed in the compiled templates starting at a root object.
children['TextConverter']->children['lower']->renderAttributes(); ?>
Once the template structure is changed from procedural to object oriented, the components should be accessed relative to the context ($this) instead of an arbitrary root. This is the change that will finally allow composable templates and template components. Generated code would then look like:
renderAttributes(); ?>
Any tag that does not use the getComponentRefCode() method or the getDataSourceRefCode methods will break and need to be fixed. data:table tags are known to directly reference $root and will have this problem.
=== Create a core:template tag ===
''
$tmpl =& new Template('xxx');
$tmpl->set('variable', 'yyyy');
This should be replaced by something like:
$tmpl =& new Template('xxx');
$data =& new ArrayDataSource();
$data->set('variable', 'yyyy');
$data->registerDataSource($data);
or alternatively:
$tmpl =& new Template('xxx');
$tmpl->registerDataSource(new ArrayDataSource(array('variable' => 'yyyy')));
=== Remove CheckNestingLevel method ===
Currently, the MISSINGENCLOSURE error is tested for on a tag by tag basis. The correct enclosure for a tag should be part of the meta data (TagInfo) for that tag. Instead of calling the CheckNestingLevel method, the compiler should check the TagInfo meta-data and perform the tests itself. This will make it easier to create tags.
Tags that require enclosure include: core:separator, page:prev, page:next, page:number, page:elipses, page:first, page:last, list:item, errorsummary, textarea, input, select
==== Move checking for required attributes out of the tag and into compiler ====
Right now, each tag checks individually for its required attributes
with code such as :
$binding = $this->getAttribute('for');
if (empty($binding)) {
$this->raiseCompilerError('MISSINGREQUIREATTRIBUTE', array('attribute' => 'for'));
}
The list of which attributes are required for a tag should be
specified in the TagInfo for that tag and the compiler should
automatically make these checks before the component is even
added to the tree.
=== Support for raw tag attributes ===
Currently, the runtime components pass all attribute values through htmlspecialchars. (see TagComponent::renderAttributes) This is not desirable in all cases, especially when attempting to use javascript in attributes. A mechanism should be added to be able to turn off the escaping for specific attributes.
Note that many times the attribute value is the same after passing through htmlspecialchars. As well, attributes of components are seldom manipulated at runtime by the user. Thus, it may be possible to optimize the output of attributes by determining at compile time which attributes would not be changed by htmlspecialchars and avoiding calling the function for those attributes as well.
There is currently a failing test case to illustrate this problem:
Fail: ./cases/template/template_attributes.test.php -> tagattributestestcase -> testjavascriptwactattribute -> Equal expectation fails at character 40 with [contents
] and [contents
] at line [319]
=== Fix failing test case ===
This test case illustrates a problem with how CompilerProperties declare scoped variables inside the templates. This should be much easier to fix after the Template Composition tasks are completed.
Fail: ./cases/examples/tags/list/listroweven.test.php -> examplestagslistroweventestcase -> testexists -> Pattern [/\s*\s*1<\/TD>\s* George<\/TD>\s*Washington<\/TD>\s*<\/TR>\s*\s*2<\/TD>\s* Alexander<\/TD>\s*Hamilton<\/TD>\s*<\/TR>\s*\s*3<\/TD>\s* Benjamin<\/TD>\s*Franklin<\/TD>\s*<\/TR>\s*<\/TABLE>/i] not detected in [String: Li...] at line [30]
==== Misc ====
=== Add data:form tag ===
data:form uses DataSource meta data to automatically generate a form for a DataSource.
=== Mmodify data:table tag to use DataSource meta data ===
===== Test package =====
==== Repackage SpikeSource PHPCoverage ====
If required bugs aren't fixed soon in the official release, we can fix them and release a patched version on our channel. Such is the beauty of an open source license. :)
==== Release Wact Test Runner as a package ====
Various cleanup is required to release the Wact Test runner as a package. Design smells caused by limitations in the PHPCoverage tool should be fixed. Any depedencies on WACT should be eliminated. Changes will be required to run in include_path. Html output could use some CSS.
==== Write test cases for test runner ====
The cobblers children has no shoes and the Test Runner is the largest part of WACT with no test cases.
===== View package =====
==== Enable Views to be used without Controllers ====
The View package should be fully available without the rest of the framework. Currently forms rely on controllers to build their action through a transition. This needs to be extracted out somehow so that forms can still be used as runtime components but don't depend on an underlying controller structure.
===== XML package =====
==== Complete integration of the xml conformance test suite ====
The w3c xml conformance test suite has thousands of XML test cases.
==== Sax API Reorganization ====
There is some Sax API organization required, as informed by failing XML conformance testings.
==== DTD Skipping ====
The current Sax parser chokes on DTDs. Code should be added to at least recognize the DTD and ignore it (rather than treat it as character data, which is current behavior.)
==== Fix failing xml conformance tests ====
There will be hundreds of esoteric failing tests. Each should be either fixed or silenced as unfixable.
==== DTD Validation ====
Create a component that listens to Sax DTD events and is able to validation the Sax Event stream based on this information.