Skip to content

Instantly share code, notes, and snippets.

@cornernote
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cornernote/cca3474b3d235a568aff to your computer and use it in GitHub Desktop.
Save cornernote/cca3474b3d235a568aff to your computer and use it in GitHub Desktop.
Missing argument 1 for yii\db\BaseActiveRecord::getAttributeHint()
root@test:/vagrant/mzn# composer show -i
almasaeed2010/adminlte 2.1.1 AdminLTE - admin control panel and dashboard that's based on Bootstrap 3
bower-asset/bootstrap v3.3.2 The most popular front-end framework for developing responsive, mobile first projects on the web.
bower-asset/jquery 2.1.3
bower-asset/jquery.inputmask 3.1.61 jquery.inputmask is a jquery plugin which create an input mask.
bower-asset/punycode v1.3.2
bower-asset/typeahead.js v0.10.5
bower-asset/yii2-pjax v2.0.2
cebe/js-search 0.9.2 A client side search engine for use on static pages.
cebe/markdown 1.0.2 A super fast, highly extensible markdown parser for PHP
cebe/markdown-latex 1.0.0 A super fast highly extensible markdown parser for PHP that converts markdown files into latex
cebe/yii2-gravatar 1.1 Gravatar Widget for Yii 2
dektrium/yii2-user v0.9.3 Flexible user registration and authentication module for Yii2
dmstr/yii2-adminlte-asset dev-master fb356cd Backend theme for Yii2 Framework
dmstr/yii2-app-command 0.3.2 Console command for Yii 2 Framework to manage your application source code and configuration settings
dmstr/yii2-log 0.1.0 SyslogTarget writes log to syslog.
dmstr/yii2-migrate-command 0.2.0 Console Migration Command with multiple paths/aliases support
ezyang/htmlpurifier v4.6.0 Standards compliant HTML filter written in PHP
fortawesome/font-awesome v4.3.0 The iconic font and CSS framework
fzaninotto/faker v1.4.0 Faker is a PHP library that generates fake data for you.
kartik-v/yii2-krajee-base v1.7.6 Base library and foundation components for all Yii2 Krajee extensions.
kartik-v/yii2-widget-select2 v2.0.0 Enhanced Yii2 wrapper for the Select2 jQuery plugin (sub repo split from yii2-widgets).
mikehaertl/php-shellcommand 1.0.5 An object oriented interface to shell commands
mikevanriel/text-to-latex 1.0.0 A converter class that converts normal ASCII text to valid LaTeX
nikic/php-parser v0.9.5 A PHP parser written in PHP
phpdocumentor/reflection 1.0.7 Reflection library to do Static Analysis for PHP Projects
phpdocumentor/reflection-docblock 2.0.4
phpspec/php-diff v1.0.2 A comprehensive library for generating differences between two hashable objects (strings or arrays).
psr/log 1.0.0 Common interface for logging libraries
rmrevin/yii2-fontawesome 2.9.2 Asset Bundle for Yii2 with Font Awesome
schmunk42/yii2-giiant 0.2.0 Gii CRUD generator for Yii 2 Framework
squizlabs/php_codesniffer 1.5.6 PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
swiftmailer/swiftmailer v5.4.0 Swiftmailer, free feature-rich PHP mailer
vlucas/phpdotenv v1.1.0 Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
yiisoft/yii2 2.0.4 Yii PHP Framework Version 2
yiisoft/yii2-apidoc 2.0.4 API Documentation generator for the Yii framework 2.0
yiisoft/yii2-authclient 2.0.4 External authentication via OAuth and OpenID for the Yii framework
yiisoft/yii2-bootstrap 2.0.4 The Twitter Bootstrap extension for the Yii framework
yiisoft/yii2-codeception 2.0.4 The Codeception integration for the Yii framework
yiisoft/yii2-coding-standards 2.0.0 Yii PHP Framework Version 2 - Coding standard tools
yiisoft/yii2-composer 2.0.3 The composer plugin for Yii extension installer
yiisoft/yii2-debug 2.0.4 The debugger extension for the Yii framework
yiisoft/yii2-faker 2.0.3 Fixture generator. The Faker integration for the Yii framework.
yiisoft/yii2-gii 2.0.4 The Gii extension for the Yii framework
yiisoft/yii2-swiftmailer 2.0.4 The SwiftMailer integration for the Yii framework
/*
Navicat MySQL Data Transfer
Source Server : test.brett.dev
Source Server Version : 50541
Source Host : 192.168.33.2:3306
Source Database : mzn
Target Server Type : MYSQL
Target Server Version : 50541
File Encoding : 65001
Date: 2015-05-25 19:20:55
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `job`
-- ----------------------------
DROP TABLE IF EXISTS `job`;
CREATE TABLE `job` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(32) NOT NULL,
`status` varchar(32) NOT NULL,
`quantity` int(11) NOT NULL,
`address` varchar(255) NOT NULL,
`scheduled_date` date DEFAULT NULL,
`scheduled_time` int(11) DEFAULT NULL,
`notes` varchar(255) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`booked_by` int(11) DEFAULT NULL,
`scheduled_by` int(11) DEFAULT NULL,
`delivered_by` int(11) DEFAULT NULL,
`collected_by` int(11) DEFAULT NULL,
`total_paid` decimal(11,4) DEFAULT NULL,
`created` datetime NOT NULL,
`deleted` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of job
-- ----------------------------
INSERT INTO `job` VALUES ('1', '', '', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('2', '', '', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '2015-05-08 12:54:19', null);
INSERT INTO `job` VALUES ('3', 'pickup', 'scheduled', '4', '', null, null, 'this is my note', '0', '0', '0', '0', null, '0.0000', '2015-05-08 13:02:01', null);
INSERT INTO `job` VALUES ('4', 'pickup', 'requested', '5', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '2015-05-08 13:15:50', null);
INSERT INTO `job` VALUES ('5', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('6', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('7', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('8', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('9', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('10', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('11', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('12', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('13', 'pickup', 'requested', '5', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', null);
INSERT INTO `job` VALUES ('14', 'pickup', 'requested', '0', '', null, null, '', '0', '0', '0', '0', null, '0.0000', '0000-00-00 00:00:00', '2015-05-08 13:50:13');
INSERT INTO `job` VALUES ('15', 'pickup', 'collected', '1', 'df', null, null, 'ddd', '0', '1', '1', null, '1', '0.0000', '2015-05-08 14:34:57', null);
INSERT INTO `job` VALUES ('16', 'delivery', 'requested', '3', 'address string here', null, null, '', '1', '0', '0', '0', null, '0.0000', '2015-05-08 14:49:32', null);
INSERT INTO `job` VALUES ('17', 'pickup', 'scheduled', '3', 'new address', null, null, '', '1', '0', '0', '0', null, '0.0000', '2015-05-18 01:48:48', null);
INSERT INTO `job` VALUES ('18', 'pickup', 'requested', '1', 'address string here', null, null, '', '1', '1', '0', '0', null, '0.0000', '2015-05-18 02:34:02', '2015-05-20 09:08:45');
INSERT INTO `job` VALUES ('19', 'pickup', 'collected', '4', 'ssss', null, null, '', '1', '1', '1', '0', '1', '0.0000', '2015-05-20 09:41:30', null);
INSERT INTO `job` VALUES ('20', 'pickup', 'collected', '4', 'address string here', null, null, '', '1', '1', '1', null, '1', null, '2015-05-20 10:20:54', null);
INSERT INTO `job` VALUES ('21', 'pickup', 'collected', '55', 'test', null, null, '', '1', '1', '1', null, '1', null, '2015-05-20 10:21:14', null);
INSERT INTO `job` VALUES ('22', 'delivery', 'delivered', '342', 'sdfsdffd dfg dfg dfg dfgdfg dfgdf', null, null, '', '1', '1', '1', '1', null, null, '2015-05-20 10:42:45', null);
-- ----------------------------
-- Table structure for `migration`
-- ----------------------------
DROP TABLE IF EXISTS `migration`;
CREATE TABLE `migration` (
`version` varchar(180) NOT NULL,
`alias` varchar(180) NOT NULL,
`apply_time` int(11) DEFAULT NULL,
PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of migration
-- ----------------------------
INSERT INTO `migration` VALUES ('m000000_000000_base', '@app/migrations', '1432546737');
INSERT INTO `migration` VALUES ('m140209_132017_init', '@dektrium/user/migrations', '1432546739');
INSERT INTO `migration` VALUES ('m140403_174025_create_account_table', '@dektrium/user/migrations', '1432546739');
INSERT INTO `migration` VALUES ('m140504_113157_update_tables', '@dektrium/user/migrations', '1432546739');
INSERT INTO `migration` VALUES ('m140504_130429_create_token_table', '@dektrium/user/migrations', '1432546739');
INSERT INTO `migration` VALUES ('m140830_171933_fix_ip_field', '@dektrium/user/migrations', '1432546739');
INSERT INTO `migration` VALUES ('m140830_172703_change_account_table_name', '@dektrium/user/migrations', '1432546739');
INSERT INTO `migration` VALUES ('m141222_110026_update_ip_field', '@dektrium/user/migrations', '1432546739');
-- ----------------------------
-- Table structure for `profile`
-- ----------------------------
DROP TABLE IF EXISTS `profile`;
CREATE TABLE `profile` (
`user_id` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`public_email` varchar(255) DEFAULT NULL,
`gravatar_email` varchar(255) DEFAULT NULL,
`gravatar_id` varchar(32) DEFAULT NULL,
`location` varchar(255) DEFAULT NULL,
`website` varchar(255) DEFAULT NULL,
`bio` text,
PRIMARY KEY (`user_id`),
CONSTRAINT `fk_user_profile` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of profile
-- ----------------------------
INSERT INTO `profile` VALUES ('1', null, null, 'admin@myapp.local', '632c8988831808e77ad27c4215384254', null, null, null);
-- ----------------------------
-- Table structure for `social_account`
-- ----------------------------
DROP TABLE IF EXISTS `social_account`;
CREATE TABLE `social_account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`provider` varchar(255) NOT NULL,
`client_id` varchar(255) NOT NULL,
`data` text,
PRIMARY KEY (`id`),
UNIQUE KEY `account_unique` (`provider`,`client_id`),
KEY `fk_user_account` (`user_id`),
CONSTRAINT `fk_user_account` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of social_account
-- ----------------------------
-- ----------------------------
-- Table structure for `token`
-- ----------------------------
DROP TABLE IF EXISTS `token`;
CREATE TABLE `token` (
`user_id` int(11) NOT NULL,
`code` varchar(32) NOT NULL,
`created_at` int(11) NOT NULL,
`type` smallint(6) NOT NULL,
UNIQUE KEY `token_unique` (`user_id`,`code`,`type`),
CONSTRAINT `fk_user_token` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of token
-- ----------------------------
-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(25) NOT NULL,
`email` varchar(255) NOT NULL,
`password_hash` varchar(60) NOT NULL,
`auth_key` varchar(32) NOT NULL,
`confirmed_at` int(11) DEFAULT NULL,
`unconfirmed_email` varchar(255) DEFAULT NULL,
`blocked_at` int(11) DEFAULT NULL,
`registration_ip` varchar(45) DEFAULT NULL,
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
`flags` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `user_unique_username` (`username`),
UNIQUE KEY `user_unique_email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', 'admin', 'admin@myapp.local', '$2y$10$1QOHR7/84g.wfBoFEEKaCeBpePnFoUwlDaBtPV3g./X.QPkRUGoHu', 'AQXxg8ydyuaW1nNvcL-Rj_BL8A_CNRan', '1432546745', null, null, null, '1432546741', '1432546741', '0');
root@test:/vagrant/mzn# ./yii gii/giiant-crud --modelClass="app\models\Job" --controllerClass="app\controllers\Job2Controller"
Running 'Giiant CRUD'...
PHP Warning 'yii\base\ErrorException' with message 'Missing argument 1 for yii\db\BaseActiveRecord::getAttributeHint()'
in /vagrant/mzn/vendor/yiisoft/yii2/db/BaseActiveRecord.php:1495
Stack trace:
#0 /vagrant/mzn/vendor/yiisoft/yii2/db/BaseActiveRecord.php(1495): yii\base\ErrorHandler->handleError(2, 'Missing argumen...', '/vagrant/mzn/ve...', 1495, Array)
#1 [internal function]: yii\db\BaseActiveRecord->getAttributeHint()
#2 /vagrant/mzn/vendor/schmunk42/yii2-giiant/crud/Generator.php(238): call_user_func(Array)
#3 /vagrant/mzn/vendor/schmunk42/yii2-giiant/crud/default/views/index.php(49): schmunk42\giiant\crud\Generator->getModelRelations(Object(app\models\Job))
#4 /vagrant/mzn/vendor/yiisoft/yii2/base/View.php(325): require('/vagrant/mzn/ve...')
#5 /vagrant/mzn/vendor/yiisoft/yii2/base/View.php(247): yii\base\View->renderPhpFile('/vagrant/mzn/ve...', Array)
#6 /vagrant/mzn/vendor/yiisoft/yii2-gii/Generator.php(317): yii\base\View->renderFile('/vagrant/mzn/ve...', Array, Object(schmunk42\giiant\crud\Generator))
#7 /vagrant/mzn/vendor/yiisoft/yii2-gii/generators/crud/Generator.php(173): yii\gii\Generator->render('views/index.php')
#8 /vagrant/mzn/vendor/yiisoft/yii2-gii/console/GenerateAction.php(52): yii\gii\generators\crud\Generator->generate()
#9 /vagrant/mzn/vendor/yiisoft/yii2-gii/console/GenerateAction.php(35): yii\gii\console\GenerateAction->generateCode()
#10 [internal function]: yii\gii\console\GenerateAction->run()
#11 /vagrant/mzn/vendor/yiisoft/yii2/base/Action.php(92): call_user_func_array(Array, Array)
#12 /vagrant/mzn/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\Action->runWithParams(Array)
#13 /vagrant/mzn/vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller->runAction('giiant-crud', Array)
#14 /vagrant/mzn/vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller->runAction('giiant-crud', Array)
#15 /vagrant/mzn/vendor/yiisoft/yii2/console/Application.php(161): yii\base\Module->runAction('gii/giiant-crud', Array)
#16 /vagrant/mzn/vendor/yiisoft/yii2/console/Application.php(137): yii\console\Application->runAction('gii/giiant-crud', Array)
#17 /vagrant/mzn/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#18 /vagrant/mzn/yii(26): yii\base\Application->run()
#19 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment