unionofrad / manual Goto Github PK
View Code? Open in Web Editor NEWli₃: The Definitive Guide
Home Page: http://li3.me/docs/book/manual/1.x/
License: BSD 3-Clause "New" or "Revised" License
li₃: The Definitive Guide
Home Page: http://li3.me/docs/book/manual/1.x/
License: BSD 3-Clause "New" or "Revised" License
Having is possible in a query, but there is no documentation for it.
There is no current explanation of how to take an application and make it a plugin, or how to start a clean plugin from scratch (and how to integrate it with your existing apps).
This is a combination of several inputs to improve the manual.
Some general problems identified in the manual:
Overhaul of the general structure/flow:
Basically, i suggest to restructure the manual to give it some sort of onion structure: You first have some easy and basic parts in the beginning, like Quickstart
and Getting started
. I suggest to merge Configuration
chapter into Getting started
, since both are about getting Lithium to run in the first place.
Then we move on to the core Lithium concepts, like MVC, Request/Reponse-cycle, Filtering and stuff, wich i would like to put in a chapter named Lithium design
. This chapter is for all abstract content.
Then for actually using Lithium, there are the chapters Basic tasks
and Advanced tasks
. Basic tasks
covers everyday tasks in lithium, while Advanced tasks
covers topics not everyone may be interested in.
This structure would reduce the number of top-level chapters and ease understanding of where to look up what.
Other issues:
On The Page http://lithify.me/docs/manual/configuration/servers/nginx.wiki
The Line:
try_files $uri $uri/ /index.php?$args
Should Read:
try_files $uri $uri/ /index.php?url=$uri;
This is a pretty key feature of the framework, but was constantly changing - now hopefully it can be stabilized and documented.
The point of set_state() is really more about serial/deserialization rather than testability. This needs to be changed in the arch guide.
many links from google end up in an empty page:
http://li3.me/docs/book/manual/1.x/views/views
There could be a redirect to
http://li3.me/docs/book/manual/1.x/views
Not really documented in detail, is also a killer feature of the framework.
Looking at code examples on pages such as http://li3.me/docs/manual/model, the indentations have disappeared!
The link "PHP Standards Working Group namespace standard" on New in PHP 5.3 doesn't work because the document has been moved. The new document seems to be here: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
We should document this as an advanced case in the Model/Data Retrieval page.
See UnionOfRAD/lithium#1276
See https://github.com/UnionOfRAD/lithium/blob/1.1/CHANGELOG.md#fixed-1 under "Fixed undetected buggy behavior in ..."
http://lithify.me/docs/manual/configuration/servers
i would like to have an manual for the builtin webserver of php: http://php.net/manual/en/features.commandline.webserver.php
Please update the manual from li3.me to the last version of this repo.
The li3.me/docs/manual version is really old. For instance check it out: http://li3.me/docs/manual/quality-code/lithium_qa.wiki and then check this: https://github.com/UnionOfRAD/manual/blob/master/en/quality-code/li3_qa.md
I highly recommend re-working the docs to organize and prioritize similar to how codeigniter does (http://codeigniter.com/user_guide/ - click on "Table of Contents" at top of page). Notes of things to emulate:
Problems with the current Lithium documentation organization:
Beginning on the very first page (http://lithify.me/docs):
On the left is "Libraries" as the header, then lithium, app, li3_docs, li3_bot, manual below it.
In the TOC of the manual, the sections are: Quickstart, Getting Started, Lithium Basics, Configuration, Writing Quality Code, Handling HTTP Requests, Working with Data, Authentication, Globalization, Extending Lithium, Lithium in the Cloud and Appendices. Of these, only "Quickstart" is intuitive.
Some specific examples of problems:
gwoo pointed me to this sample code: https://github.com/pointlessjon/sphere
It's actually the most useful doc I've seen so far. Sorry to be blunt, but it was more useful than the whole existing manual. I recommend putting a link to this code prominently on the web site, including on the first page of the manual.
Hello.
I have installed the framework like instructed here: http://lithify.me/docs/manual/getting-started/installation.wiki
My server is running under a virtualbox machine with archlinux on it as guest. The httpd daemon is nginx + php-fpm 5.5.6-1.
I have configured the nginx server section as instructed here: http://lithify.me/docs/manual/configuration/servers/nginx.wiki, my webroot is set to /srv/http/li_framework/app/webroot/
.
The lithium framework was installed using the git commands as instructed on wiki.
When I access my web server using localhost:8080, i get this errors:
http://pastium.com/view/4e308fe3e0a174b6224b2116eedb5acb
All the files from the li_framework dir are owned by the http user and group. I don't understand why I get that errors, how can I solve them?
I've removed this to quicken the restructure being moved back to master. I'm adding this issue so the good ideas here don't get lost.
i reset to HEAD action.php and modify filter:
https://gist.github.com/1064588
now its work better but
im not sure from come $request is.
$request is set by Auth::check('default', $this->request); in UsersController->login() ?
but why eg from manual don't wanna work without my isset workaround.. ?
I wanted to try out this framework. As the manual recommends, I did this:
$ composer create-project --prefer-dist unionofrad/framework project
Could not find package unionofrad/framework with stability stable.
It's fine if the project doesn't have a stable tag, but you should modify the manual to reflect the correct installation method.
For the moment, I use:
$ composer create-project --prefer-dist unionofrad/framework:dev-master project
These paths should be included in manual, extending lithium section though.
Sometimes especially adapter paths can become confusing.
In the manual, examples are given for how to link javascript code from a remote server here:
http://lithify.me/docs/manual/handling-http-requests/views.wiki
however; the API here has no examples at all for using the script html helper:
http://framework.local/docs/lithium/template/helper/Html::script()
My suggestion would be to add a couple of the examples in the manual to the API docs.
The link for installation in the sentence "If you haven't already installed one then check out the installation guide in this manual" is broken and leads to a 404 page. It's in the first paragraph under the heading "Setting Up".
Currently the link is: https://github.com/UnionOfRAD/manual/blob/master/en/quickstart/installation
It needs to be:
https://github.com/UnionOfRAD/manual/blob/master/en/installation
Typo in cache config examples where "Memcached" is written instead of "Memcache" on the website and here. "Memcached" does not seem to work.
For instance:
I was creating a plugin so that I can communicate with a legacy API so I was reading up on Creating Data Sources.
It talks about using item()
but it seems like the use of item() is deprecated.
This was brought to my attention by Mehdi (mehlah?) in this post at StackOverflow: Overriding data\Source::read() and using item() gives me incorrect results
Also, I ran into an error using the code from doc. For dependency injection, it defines service
, entity
and set
for $_classes
. However, I believe we also need to add 'schema' => 'lithium\data\DocumentSchema'
because without that, I get the following error:
Fatal error: Uncaught exception 'lithium\core\ClassNotFoundException' with message 'Class `schema` of type `` not found.' in /var/www/lithium/clean/libraries/lithium/core/Libraries.php on line 693
lithium\core\ClassNotFoundException: Class `schema` of type `` not found. in /var/www/lithium/clean/libraries/lithium/core/Libraries.php on line 693
Thanks guys, I love this framework so much that I voluntarily break rest just so that I can mess around with it :)
The path, manual > architecture > File Structure > Libraries, has the following line,
Any plugins you download from the Laboratory, or pull down via the Library li3 command should end up here.
The hyperlink 'Laboratory' is broken.
The page Creating a user in M, V, C describes how to add a filter to the user model so it saves the user's password using \lithium\security\Password::hash(). This is fine, but then Simple Authentication continues by using the \lithium\security\auth\adapter\Form, which uses String::hash() (i.e., sha1) to hash passwords.
Thus, if one was to follow the procedure in order, one would end up with a system that does not work because of the different hashing functions.
Either both should use String::hash(), or Simple Authentication should describe how to use \lithium\security\Password::hash() and \lithium\security\Password::check(). The later combination is more secure, that would be my preference. Of course that's just a personal preference, feel free to disagree :)
An example of a working Adapter (that just overrides the check
method of the Form Adapter) would be:
<?php
namespace app\extensions\adapter\security\auth;
use \lithium\security\Password;
class PasswordHashedForm extends \lithium\security\auth\adapter\Form
{
// We don't need to hash the password, so don't use filters
public $_filters = array();
/**
* Check if the supplied credentials are okay
*/
public function check($credentials, array $options = array()) {
$model = $this->_model;
$query = $this->_query;
$conditions = $this->_scope + $this->_filters(array_map('strval', $credentials->data));
// do not include the password in the query ...
unset($conditions['password']);
$user = $model::$query(compact('conditions'));
// ... instead verify the password using the Password class
if (Password::check($credentials->data['password'], $user->password))
return $user->data();
return false;
}
}
?>
After fiddling with relationships (belongsTo
) I found that in en/working-with-data/relationships.wiki
this :
<?php
class Categories extends \lithium\data\Model {
public $hasMany = array('Products' => array(
'class' => 'Products',
'key' => 'category_id',
'conditions' => array(),
'fields' => array(),
'order' => null,
'limit' => null
));
}
should be replaced by this :
<?php
class Categories extends \lithium\data\Model {
public $hasMany = array('Products' => array(
'to' => 'app\\models\\Products',
'key' => 'category_id',
'conditions' => array(),
'fields' => array(),
'order' => null,
'limit' => null
));
}
I'm not sure if it's an issue in the code or in the documentation but since I got it working without modifying li3, I assume the doc is wrong.
It would be fantastic if there was a centralized location for all the different Litihium plugins. It could simply be a page on the lithium website with titles, description, a link to the plugin home page, and/or a link to a git repo for the plugin.
Or, possibly, you could create another Github organization, like "lithium_plugins" that hosts the master repo for each plugin. But that sounds as though it may be a little less practical, since (I think?) you would run into permissions issues for all the different authors for their plugins.
Configuration: Working with External Libraries
Zend Framework 1.x
First, we recommend installing ZF1 from the unofficial Git mirror, at git://github.com/Enrise/Zend.git. This distribution contains only the class library…
…and is outdated! No updates since 2013. A lot of security updates are missing!
The chapter with the problem: https://github.com/UnionOfRAD/manual/blob/master/en/configuration/third-party-libraries.md#zend-framework-1x
The path, manual > models > querying, has the following sentence,
Some finder implementations might require a little processing in addition to a default set of conditions-somewhat like the . In that case, you can.......
Looks like the sentence is incomplete.
This is a constant request for me, there is a ton of automatic stuff going on here that is extremely difficult for new folks to figure out.
http://lithify.me/docs/manual/working-with-data/relationships.wiki has wrong data in it.
class Categories extends \lithium\data\Model {
public $hasMany = array('Products' => array(
'class' => 'Products',
'key' => 'category_id',
'conditions' => array(),
'fields' => array(),
'order' => null,
'limit' => null
));
}
class
should be to
conditions
should be constraint
(previously on UnionOfRAD/lithium#555 )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.