望远镜在laravel-7.25上安装失败

时间:2020-09-12 12:22:07

标签: php laravel laravel-7 telescope

PHP 7.4.3

Laravel版本:7.24

我只是想让作曲家要求laravel / telescope,并且作曲家安装失败。

Using version ^4.0 for laravel/telescope
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for laravel/telescope ^4.0 -> satisfiable by laravel/telescope[4.x-dev, v4.0.0].
    - Can only install one of: laravel/framework[v7.28.1, 8.x-dev].
    - Can only install one of: laravel/framework[8.x-dev, v7.28.1].
    - Can only install one of: laravel/framework[8.x-dev, v7.28.1].
    - Conclusion: install laravel/framework 8.x-dev
    - Installation request for laravel/framework (locked at v7.28.1, required as ^7.24) -> satisfiable by laravel/framework[v7.28.1].


Installation failed, reverting ./composer.json to its original content.

composer.json

"require": {
        "php": "^7.2.5",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^6.3",
        "intervention/image": "^2.5",
        "laravel/framework": "^7.24",
        "laravel/tinker": "^2.0",
        "laravel/ui": "^2.1"
    },

5 个答案:

答案 0 :(得分:3)

我遇到了同样的问题。

composer require laravel/telescope "^2.0" 

成功

- Installation request for laravel/framework (locked at v7.28.1, required as ^7.24) -> satisfiable by laravel/framework[v7.28.1].

告诉您发生了什么。您正在处理的项目已锁定为laravel / framework v7.28.1。当前版本的Telescope需要laravel / framework ^ 8.0。也许您将能够使用望远镜v3.0。

答案 1 :(得分:2)

class MyBookPage extends StatefulWidget {
          final BookDetails _bookDetails;
        
         MyBookPage(this._bookDetails);
        
          @override
       MyBookPageState createState() {
            return MyBookPageState();
          }
        }
        
        
        class MyBookPageState extends State<MyBookPage> {
          final _formKey = GlobalKey<FormState>();
          final TextEditingController _textNameController = new TextEditingController();
          final TextEditingController _textPhoneController =
          new TextEditingController();
          String _selectBookType = "";
          String title;

          bool isVisible = false; // New <----------

          @override
          void initState() {
            _textNameController.text = widget._bookDetails.fullName;
          }
        
          @override
          Widget build(BuildContext context) {
            return BlocBuilder<LoginCubit, LoginState>(
              builder: (context, state) {
                return Scaffold(
                  appBar: AppBar(
                    title: Text("Add New Book"),
                  ),
                  body: Container(
                    margin: EdgeInsets.symmetric(horizontal: 0, vertical: 0),
                    padding: const EdgeInsets.all(20.0),
                    child: SingleChildScrollView(
                      child: bookForm(context),
                    ),
                  ),
                );
              },
            );
          }
        
          Widget bookForm(BuildContext context) {
            final format = DateFormat("yyyy-MM-dd");
            return Form(
              key: _formKey,
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
        
                children: <Widget>[            
                  SizedBox(height: 10,),

                  FormBuilderRadioGroup( activeColor: Colors.deepOrange,  // New <----------
                    decoration: InputDecoration(
                      labelText: 'Please Select Book type \*',
        
                      hintText: 'Please select book',
        
                      border: OutlineInputBorder(),
                      filled: true,
                    ),
                    attribute: "book_type",
                    validators: [
                      FormBuilderValidators.required(),
                    ],
                    onChanged: (value) { // New <----------
                      if (value == "Yes") {
                        setState((){
                          isVisible = true;
                        });
                      } else {
                        setState(() { 
                          isVisible = false;
                        });
                      }
                    },
                    options: [
                      "Yes",
                      "No",
                    ]
                        .map((lang) => FormBuilderFieldOption(
                      value: lang,
                      child: Text(
                        lang,
        
                      ),
                    ))
                        .toList(growable: false),
                  ),
        
                  SizedBox(height: 15,),
                  Visibility(visible: isVisible,  // New <----------
                    child: TextFormField(
                    keyboardType: TextInputType.multiline,
                    maxLines: 4,
                    maxLength: 100,
                    /*  controller: _textNameController,*/
                    decoration: const InputDecoration(
        
                      hintText: ' please add here the reason',
                      labelText: 'Select Reason',
                      border: OutlineInputBorder(),
                    ),
                    validator: (value) {
                      if (value.isEmpty) {
                        return 'Please add remark ';
                      }
                      return null;
                    },
        
                  ),
                  ),
        
                  SizedBox(height: 10,),

                  SafeArea(
                    child: Align(
                      alignment: FractionalOffset.bottomCenter,
                      child: Container(
        
                        height: 80,
                        width: double.infinity,
                        padding: EdgeInsets.all(16),
                        child: FlatButton(
                               onPressed: () {
        
                                 {
                                   AwesomeDialog(
                                       context: context,
                                       animType: AnimType.LEFTSLIDE,
                                       headerAnimationLoop: true,
                                       dialogType: DialogType.SUCCES,
                                       title: 'Successfully Submitted',
                                       desc:
                                       'Your data has been successfully submitted',
                                       btnOkOnPress: () {
                                         debugPrint('OnClcik');
                                       },
                                       btnOkIcon: Icons.check_circle,
        
                                       onDissmissCallback: () {
                                         debugPrint('Dialog Dissmiss from callback');
                                       })
                                     ..show();
                                 }
                            // It returns true if the form is valid, otherwise returns false
                        /*    if (_formKey.currentState.validate()) {
                              print(_textPhoneController.value.text +
                                  "->" +
                                  _selectLeadType);
                              // If the form is valid, display a Snackbar.
                              Scaffold.of(context)
                                .showSnackBar(SnackBar(content: Text('Data is in processing.')));
                            }*/
        
                          },
        
        
                          child: Text("SUBMIT",style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),),
                          color: m_primaryColor,
                          shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(4),
                          ),
                        ),
                      ),
                    ),
                  )
        
                  ,
        
                ],
              ),
        
            );
        
          }
        
        
        }

应将其投入工作。

答案 2 :(得分:1)

以下对我有用

private EditText editTextUsername, editTextPhone;
private Button buttonSave;

private FirebaseDatabase db;
public DatabaseReference databaseReference;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_edit_profile);
    Toolbar toolbar = findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

   // firebaseAuth = FirebaseAuth.getInstance();

    editTextUsername = findViewById(R.id.editTextUsername);
    editTextPhone = findViewById(R.id.editTextPhone);
    buttonSave = findViewById(R.id.buttonSave);

    db = FirebaseDatabase.getInstance();
    databaseReference = db.getReference();



    buttonSave.setOnClickListener(new View.OnClickListener(){

        @Override
        public void onClick(View v) {
            String username = editTextUsername.getText().toString();
            databaseReference.setValue(username);
        }
    });

}

答案 3 :(得分:0)

这帮我解决了同样的问题

composer require laravel/framework -W

composer require laravel/telescope

答案 4 :(得分:-1)

尝试一下: 作曲家需要laravel / telescope“ ^ 1.2”或 作曲家需要laravel / telescope“ ^ 2.0”